Why the time shows "00:00:00"

Hi, I'm creating timezone convert function to cover that the zone that New_time function won't cover in 8i with the help of JAVA.
However, with the code below, the time will be always "00:00:00" when return from Oracle.
Do I missing something? Here are the code:
create or replace and compile java source named "DateConvert" as
import java.text.*;
import java.util.*;
public class DateConvert {
     public static String getDate(java.sql.Date oraDate, String tz1, String tz2) {          
          long inTime = oraDate.getTime();
          Date javDate = new Date(inTime);
          DateFormat formatter = new SimpleDateFormat("MM-dd-yyy HH:mm:ss a");
          formatter.setTimeZone(TimeZone.getTimeZone(tz1));
          formatter.setTimeZone(TimeZone.getTimeZone(tz2));
          return "result: " + formatter.format(javDate) + " Oracle Date: " + oraDate + " Java Date: " + javDate;
create or replace function TZ_Convert(myDate Date, tz1 varchar2, tz2 varchar2)
return varchar2
as language java
name 'DateConvert.getDate(java.sql.Date, java.lang.String, java.lang.String) return java.lang.String';
variable test varchar2(600);
call TZ_Convert(sysdate, 'SGT','GMT') into :test;
print test;
Here are the result:
vw@abt> print test;
TEST
result: 04-10-02 05:00:00 AM Oracle Date: 2002-04-10 Java Date: Wed Apr 10 00:00:00 CDT 2002

Use a java.sql.Timestamp instead of java.sql.Date

Similar Messages

  • Is it possible to change the way the time shows?

    Is it possible to change the way the time shows from 10.00 to 10:00? Why does it show with a . anyways?
    iOS 8.1.2 - iPhone 6
    Espen (Norway)

    The manual showed you the area to make changes in. As I stated earlier, it has to do with Regional formats. Just like some regions use the period between dates as well. The same is true for dates. In the US, we normally would show today's date as January 10, 2015. In many European countries, it would be 10 January 2015. The same is true for time. We generally use 12-hour format, many places use 24-hour format. How it is displayed on the phone is based on the generally accepted method for the region. If on the phone you go to Settings>General>Language & Region, you can see your regional format settings. If you go under Region Formats, tap on Advanced. That gives you the option to make some other changes if you like, rather than using the regional standards.

  • HT4623 when i doing my update my ipad 3 why the itunes show this message ? (the ipad could not be restored this device isn't eligible for the requested guid ) what can i do now please reply urgent thanks

    when i doing my update my ipad 3 why the itunes show this message ? (the ipad could not be restored this device isn't eligible for the requested guid ) what can i do now please reply urgent thanks

    Make sure you have the latest software on your computer (tap to enlarge image)

  • The time showing on Cisco Unified CCX Historical Reportsare not correct

    Hello,
    Issue: The time showing on the Historical Reports are not correct
    Error message/issue description:
    While  comparing the recorded calls from QM Management Destop system to the reporting system the timings on the historical reports appear to be at least an hour behind. Can these be synced to show the same times
    Thanks !!
    Shridhar Reddy

    Hi Shridhar,
    The  time zone displayed in the report is either UTC or local time zone,  based on the TIMEZONE settings in hrcconfig.ini. You can also change the  time zone for each report as shown in the procedure.
    Note:  When a report shows date and time information for an event or an  activity in the report data, that date and time is based on the TIMEZONE  configuration in hrcconfig.ini.
    The Start and End time is also based on the TIMEZONE configuration in hrcconfig.ini.
    The difference between the server time and the selected time zone is displayed within parentheses beside the Start and End time.
    The report generated time displayed at the bottom of the report is the local time of the HR client machine.
    To change the time zone for a particular report, follow these steps:
    Procedure:
    Step 1: In the Unified CCX Historical Reports main window, choose the report settings that you want.
    Step 2: Choose the Settings menu.
    Note:  You notice the check mark beside the Use UTC Time Zone for Reports menu  option. This depends on the configuration in hrcconfig.ini.
    If  UTC time zone (value 1) is configured, the check mark is displayed. If  local time zone (value 0 - Default) is configured, the check mark is not  displayed. For more details, refer The hrcConfig.ini Configuration  File, page 2-13.
    Step 3Click Use UTC Time Zone for Reports to select or unselect the option manually.
    Please refer the section "The hrcConfig.ini Configuration File" from page 33 onwards in the below link,
    http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_5/user/guide/uccx85hrug.pdf
    Also please refer the below thread for changing time zone.
    https://supportforums.cisco.com/thread/2145833?tstart=0
    Hope it helps.
    Anand
    Pls rate helpful posts !!

  • Why the time of the online redo logs doesn't change?

    Oracle 11.1.0.7 on windows 2008.I find the time of the online redo logs doesn't change since Jan 18 when I had restarted database,and the time of some datafiles doesn't change either.the database is always online and changes are wrriting to the files, I don't know how this happened?
    would anyone help me? thank you.

    ROCK wrote:
    I found some datafiles have the latest date,but the other not. They all have write/read operations on them.
    and the switching of the redo logs doesn't change the timestamps of the logfiles since Jan.18 when I had restarted the database. this situation does not appear on the early 8.1.7 database on windows 2000
    Does this situation normal?Hi,
    Why dont you post the output of the query you are using such as
    select group#, first_time, status from v$log;
    select name, last_time, status from v$datafile;
    select name, CHECKPOINT_TIME, status from v$datafile_header;Time stamp wont change for offline and may be for temp tablespace.
    Regards
    Anurag

  • Why the tree show different while i use XML and XMLList as the data provider

    Code is as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:services="services.*" layout="vertical">
    <services:CommonSvc id="ws" NameSpace="ws.wsSysDict" creationComplete="ws.getXmlList()"/>
    <mx:Tree width="100%" height="100%" labelField="@Name" dataProvider="{ws.xml}" fontSize="18" showRoot="false"/>
    </mx:Application>
    Shown below:
    as you see above,the font show Incomplete, if i change the dataprovider as  follows:
    <mx:Tree width="100%" height="100%" labelField="@Name" dataProvider="{ws.xml.obj}" fontSize="18" showRoot="false" />
    it  show complete when i use xmllist as the tree's dataprovider
    why it show like that while i use the xml as the tree's dataprovider,hope anybody's helping

    XML is a single node, XMLList is multiple nodes.  ShowRoot will affect the
    display

  • Why the time and date is not correct when I save a waveform in txt format, using Labview 6.1?

    I am using Labview 6.1 and my operation system is Windows 98. The date/time properties is configured in the Windows (time and date in the control panel is correct). I generated a waveform using Basic Function Generator.vi and saved this using the Export Waveforms to Spreadsheet File.vi. When I opened this file the date and time was wrong. Only the delta t was correct and it did not show the date neither the time, only a float number. How can I adjust the correct time?

    Actually, the date/time is correct, it is expressed as seconds since January 01, 1904.
    In order to print the string version of the date/time from your file, you will need to write a utility that converts the date/time to a string or series of strings in whatever format you wish. This can be done by reading the first line (I assume that is the line with the time on it), formatting the date/time into a string, and writing over this information in the file.
    The waveform VIs were meant to be used internally to read and write waveform data. Any use beyond that should require you to add formatting and other information/data as necessary.

  • TS3920 Can I move where the time shows up on my lock screen?

    I am just wondering if anyone knows how to move the size and location of the time and date showing up on the Lock screen of my Iphone 5c

    No you cannot. This is in the iOS.

  • Nokia 6220c - Possible to have the time show all t...

    A feature I used to like on my old nokia was that the time up showed all the time in power saver mode. So for example if the phone was on my desk i could look at it for the time, without having to unlock the phone, is this still possible? thanks

    Of course it is. You can set original small clock from nokia system to stay tuned on always, or you can install cclock apl. which has big clock numbers, date,etc.
    Message Edited by bojanbb76 on 16-Aug-2008 09:08 AM

  • Can anybody help me in finding the reasons why the time of email received are different from the one on my macbook which time is correct

    Hi
    Can anyone help me in finding the reason why the date on e=mail reced is different from the one on my MacBook eventhough it is correct
    Thanks

    Try this...
    Triple click anywhere in the line below to select it and press Ctrl+C to copy it.
    cmd /k netsh winsock reset
    Press the WinLogoKey+R to open the run dialog, then Ctrl+V to paste, then press enter/return.
    You should get something similar to this:
    Reboot the computer and the problem should be resolved.
    If it doesn't work then perhaps a full tear down and rebuild of iTunes will fix things. See Troubleshooting issues with iTunes for Windows updates for details.
    tt2

  • Why the time in my calander changes the time zone?

    After addind event to my calender for a certain time. When i check back after sometime I see the time zone Cupertino instead of Halifax and this chages the alert alarm? Does anybody have I dea what's going on.  Also this events records different time on the icloud calander. Thanks in advance for your help.

    Are the other icons in the upper right of the dock working okay? It's possible the menu bar (more accurately, SystemUIServer) has crashed or has hung. You could try killing it in Activity Monitor and it should re-launch and your dock should update.

  • Does anyone know why the time line at the bottom disappears

    I am halfway through a bloody video and can't see what i am doing now as the time line with all the video clips has disappeared.
    I have reinstalled Premiere Elements 13 but still the same.

    Have you tried scrolling down the timeline view?
    Have you tried right-clicking on the timeline and selecting the option to remove all empty tracks so that you're not using more vertical space than you need to?

  • Why the tv show i dowload is played like slow motion

    I dowload three NBA game in the itune,but none of them are play normal.

    Hey Corey,
    I'd take a look at the following article, which shows how to download your previous purchases directly to your iPod touch (as long as it has been associated to your Apple ID):
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/ht2519
    Open the iTunes Store on your device.
    Make sure you are signed in with the same Apple ID you used for the original purchase.
    Tap More from the bottom navigation bar.
    Tap Purchased to go to your Purchased page.
    Tap TV Shows.
    Locate the TV show episode or series you would like to download.
    Once you've located the TV shows you are looking for, tap the download button.
    The TV show will begin downloading.
    Best,
    David

  • New to ipad but have charged it and done what I think should be done however the time shows about 8 hours wrong but find my ipad is on???

    the new ipad is set as icloud  find my ipad but the clock is 8 hours wrong  help please

    Hi, to change the time and/or date go into Settings, general, Date &amp; Time. From here you have the option to "set automatically", if you turn this off a third option will appear where you can manually set the time and date. Hope this helps.

  • Why the tv show that i purchase does not appear for downloads?

    I need help to get my purchase tv shows on my apple tv it doesn not allowed me to downloaded why is that

    Are you trying to use homesharing? Airplay? What exactly are you experiencing? There is no accessible HD in the ATV so I wasn't sure what you meant by 'download'
    If it is one of the above, make sure all are on the same network and have homesharing/airplay turned on.
    http://support.apple.com/kb/TS2972

Maybe you are looking for