Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: get UTC date in Oracle 7.3.4
Thanks Kevin!
Your example works, but:
I tried ( on 9.2, since I have no access to the 7.3.4 instance; my collegue still has to try it on 7.3.4, but I suppose the same error will happen ):
select to_char(new_time(sysdate,'CEST','GMT'),'YYYY-MM-DD-HH24.MI.SS') from dual
*
The problem is, new_time accepts only a few timezones, but unfortunately we have Central European Time here in Austria, additionally the daylight saving madness time switch happens here too.
But maybe I can use one of the supported timezones (with daylight saving
time),
apply an offset in order to get our timezone and use new_time then.
I still have to figure out, if the "switching days" of the valid timezones
for new_time
are the same as in the European Union...
<CHAGRIN>
Getting UTC Time in Oracle is still a mess, even in 9.2 there is no built
in function
a la UTCSYSDATE...
</CHAGRIN>
Andreas
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Kevin Lange
Sent: Wednesday, March 10, 2004 6:38 PM
To: 'oracle-l_at_freelists.org'
Subject: RE: get UTC date in Oracle 7.3.4
How about the NEW_TIME function . Such as :
select to_char(new_time(sysdate,'CST','GMT'),'YYYY-MM-DD-HH24.MI.SS') from dual
-----Original Message-----
From: Andreas.Haunschmidt_at_voestalpine.com
[mailto:Andreas.Haunschmidt_at_voestalpine.com]
Sent: Wednesday, March 10, 2004 11:26 AM
To: oracle-l_at_freelists.org
Subject: get UTC date in Oracle 7.3.4
Dear List Members!
A collegue running Oracle 7.3.4 needs to get the SYSDATE in UTC (GMT),
as far as I know, there is no trivial solution to get this done
in SQL or PL/SQL only.
We would be grateful, if anyone had a solution...
Any ideas?
Thanks in advance
Andreas
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlput 'unsubscribe' in the subject line.
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlput 'unsubscribe' in the subject line.
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org
![]() |
![]() |