Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: function to get GMT time
Hi Andreas,
You can do this with the NEW_TIME date funntion:
SQL> alter session set NLS_DATE_FORMAT = 'DD-MM-YYY HH24:MI:SS';
Session altered.
SQL> select sysdate "GMT" from dual;
GMT
SQL> select new_time(sysdate, 'GMT', 'AST') "AST" from dual;
AST
This shows Atlantic Standard Time, there are a list of the time zones available, and description of the funciton in the SQL Reference Manaual - page 185
HTH Mark
-----Original Message-----
Andreas VASL/FAS
Sent: Tuesday, April 03, 2001 04:45
To: Multiple recipients of list ORACLE-L
Hi !
Is there a way to get GMT time within PL/SQL independent from the local time(zone), I'm looking for a function similar to SYSDATE, but it should return GMT instead of the local time.
TIA Andreas
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Haunschmidt Andreas VASL/FAS INET: Andreas.Haunschmidt_at_voest.co.at Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Tue Apr 03 2001 - 11:34:28 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Mark Leith INET: mark_at_cool-tools.co.uk Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
![]() |
![]() |