GMT to EST or EDT [message #430005] |
Fri, 06 November 2009 15:21 |
smandeh
Messages: 3 Registered: November 2009 Location: United States
|
Junior Member |
|
|
Hello all,
Maybe someone can help me with datetime conversion.
I have an incoming datetime, date time 04/12/2008 9:30:00. This time is in GMT but I need to convert it to EST prior to storing it in the database. I sm currently using new_time function to do this and it works fine but with the time change in Nov I am off by one hour.
I need to write a SQL statement that converts the incoming datetime from GMT to EST when DST is not being observed or EDT when DST is being observed.
I am a PL/SQL newbie. Pleae forgive me if this is a trivial matter.
Thanks for your help and time.
Big Bird
|
|
|
|
Re: GMT to EST or EDT [message #430045 is a reply to message #430028] |
Sat, 07 November 2009 08:00 |
smandeh
Messages: 3 Registered: November 2009 Location: United States
|
Junior Member |
|
|
Michel,
Currently I have the below SQL:
SELECT NEW_TIME('EVENT_DATE', 'GMT', 'EST') INTO CONVERTED_DATE FROM DUAL;
I then insert CONVERTED_DATE into my Database. The EVENT_DATE is the incoming date. This works fine but manually need to change during DST to the below code
SELECT NEW_TIME('EVENT_DATE', 'GMT', 'EDT') INTO CONVERTED_DATE FROM DUAL;
I need one SQL statement that will do the proper conversion regardless whether or not it is Day Light Saving time.
Thanks
Big Bird
|
|
|
|
|