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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DATE with time zones

Re: DATE with time zones

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 26 Oct 2005 08:11:52 -0700
Message-ID: <1130339512.791823.164630@g14g2000cwa.googlegroups.com>


You can select the date columns using a function that applies the local timezone's offset from the database timezone using the Oracle provided function: new_time.

select to_char(sysdate,'YYYYMMDD HH24:MI:SS') as "Eastern Daylight"

       ,to_char(new_time(sysdate,'EDT','GMT'),'YYYYMMDD HH24:MI:SS') GMT
from sys.dual

You will need a method to get the user's time zone: table, sys_context, or other source, but it can be done.

HTH -- Mark D Powell -- Received on Wed Oct 26 2005 - 10:11:52 CDT

Original text of this message

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