Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: function to get GMT time

RE: function to get GMT time

From: Mark Leith <mark_at_cool-tools.co.uk>
Date: Tue, 03 Apr 2001 09:34:28 -0700
Message-ID: <F001.002DFC99.20010403092140@fatcity.com>

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



03-04-001 17:05:25

SQL> select new_time(sysdate, 'GMT', 'AST') "AST" from dual;

AST



03-04-001 13:08:41

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-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). -- 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).
Received on Tue Apr 03 2001 - 11:34:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US