NEW_TIME(x,time_zone1,time_zone2)
converts x from time_zone1
to time_zone2
.
The syntax for the new_time
function is:
new_time( date, zone1, zone2 )
zone1 and zone2 Value | Description |
---|---|
AST | Atlantic Standard Time |
ADT | Atlantic Daylight Time |
BST | Bering Standard Time |
BDT | Bering Daylight Time |
CST | Central Standard Time |
CDT | Central Daylight Time |
EST | Eastern Standard Time |
EDT | Eastern Daylight Time |
GMT | Greenwich Mean Time |
HST | Alaska-Hawaii Standard Time |
HDT | Alaska-Hawaii Daylight Time |
MST | Mountain Standard Time |
MDT | Mountain Daylight Time |
NST | Newfoundland Standard Time |
PST | Pacific Standard Time |
PDT | Pacific Daylight Time |
YST | Yukon Standard Time |
YDT | Yukon Daylight Time |
The following query uses NEW_TIME()
to convert date from PST to EST:
SQL> SELECT TO_CHAR(NEW_TIME(TO_DATE('25-MAY-2011 21:45',
2 'DD-MON-YYYY HH24:MI'), 'PST', 'EST'), 'DD-MON-YYYY HH24:MI')
3 FROM dual;
TO_CHAR(NEW_TIME(
-----------------
26-MAY-2011 00:45
SQL>