RE: get UTC date in Oracle 7.3.4

  • From: Andreas.Haunschmidt@xxxxxxxxxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 10 Mar 2004 19:42:55 +0100

Bricklen,
thanks for your answer.

In 9.2 it works, so a function 
returning the current date in UTC could be:

CREATE OR REPLACE 
FUNCTION UTCSYSDATE 
RETURN DATE IS
BEGIN
  RETURN to_date(to_char(SYS_EXTRACT_UTC(CURRENT_TIMESTAMP),'YYYY-MM-DD
HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS');
END;
/

SELECT UTCSYSDATE FROM DUAL;

UTCSYSDATE
-------------------
2004-03-10 18:38:39


But my collegue has Oracle 7.3.4, I fear, 
the functions SYS_EXTRACT_UTC and CURRENT_TIMESTAMP are not available...




-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Bricklen Anderson
Sent: Wednesday, March 10, 2004 7:21 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: get UTC date in Oracle 7.3.4


Andreas.Haunschmidt@xxxxxxxxxxxxxxx wrote:
<snip>
> <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
> 
sys_extract_utc?

-- 
Bricklen Anderson, Database Administrator
PresiNET Systems
http://www.PresiNET.com
Online Demo: https://www.presinet.com/secure/login
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: