Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: time zone related problem
uday wrote:
> I have to convert given time from "EST" to any of the following
> timezones
> Poland
> Etc/GMT-3
> ACT
> Etc/GMT-2
> Etc/GMT-10
> GMT
> Etc/GMT-9
> Etc/GMT-1
> CET
> CST
> Etc/GMT+6
> US/Pacific
> EST
> PST
> AGT
> Hongkong
>
> I cannot use java stored-procedure {the JAVA support is not installed
> at the production server}
>
> I have to use it from within oracle tried using new_time but
> not-supporting all above timezone
>
>
> some-body please help
SELECT * FROM V$TIMEZONE_NAMES will show you all time zone names Oracle supports. All time zone names you listed are present there (at least in 10.1.0.5.) To convert a time stamp to another time zone you can use this syntax:
SELECT :timestamp_var AT TIME ZONE 'timezone-name' FROM DUAL;
For example,
SQL> ALTER SESSION SET TIME_ZONE='EST'; Session altered.
SQL> SELECT current_timestamp AT TIME ZONE 'Poland' FROM DUAL;
CURRENT_TIMESTAMPATTIMEZONE'POLAND'
CURRENT_TIMESTAMP
Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com
Received on Mon Sep 18 2006 - 15:28:06 CDT
![]() |
![]() |