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

Home -> Community -> Usenet -> c.d.o.server -> Re: timestamp question

Re: timestamp question

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 20 Sep 2002 15:44:38 GMT
Message-ID: <3D8B4260.FA5996B5@exesolutions.com>


Joe Sath wrote:

> We are using Oracle 9.2.
> I need a way to figure out what time is it at certain time zone.
> Say what is the time at US/Pacific now.
>
> This is how I do it.
>
> select to_char((sysdate - (substr(tz_offset('US/Pacific'),3,1) -
> substr(tz_offset('US/Eastern'),3,1))/24),'yyyy/mm/dd hh24:mi:ss')
> from dual
>
> But it looks ugly.
> Is there any better way of doing it?
>
> Thanks
>
>
> --
> Sent by joebayerii from hotmail part of com
> This is a spam protected message. Please answer with reference header.
> Posted via http://www.usenet-replayer.com/cgi/content/new

You are making this way too difficult: Try these and see if they help.

SELECT DBTIMEZONE FROM DUAL;
SELECT SESSIONTIMEZONE FROM DUAL;
SELECT TZ_OFFSET('US/Eastern') FROM DUAL;

For information on these, and more, go to: http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96540/functions156a.htm#79794

Daniel Morgan Received on Fri Sep 20 2002 - 10:44:38 CDT

Original text of this message

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