The NEW_TIME function converts a date and time from one time zone to another.
This function returns a value of the data type DATE. The syntax is:
NEW_TIME(DATE, time_zone1, time_zone2)
The time_zone1 and time_zone2 parameters must be string values from the time zone column in the following table:
Time zone | Offset from UTC | Description |
---|---|---|
AST | UTC+4 | Atlantic Standard Time |
ADT | UTC+3 | Atlantic Daylight Time |
BST | UTC+11 | Bering Standard Time |
BDT | UTC+10 | Bering Daylight Time |
CST | UTC+6 | Central Standard Time |
CDT | UTC+5 | Central Daylight Time |
EST | UTC+5 | Eastern Standard Time |
EDT | UTC+4 | Eastern Daylight Time |
GMT | UTC | Greenwich Mean Time |
HST | UTC+10 | Alaska-Hawaii Standard Time |
HDT | UTC+9 | Alaska-Hawaii Daylight Time |
MST | UTC+7 | Mountain Standard Time |
MDT | UTC+6 | Mountain Daylight Time |
NST | UTC+3:30 | Newfoundland Standard Time |
PST | UTC+8 | Pacific Standard Time |
PDT | UTC+7 | Pacific Daylight Time |
YST | UTC+9 | Yukon Standard Time |
YDT | UTC+8 | Yukon Daylight Time |
The following is an example of the NEW_TIME function:
SELECT NEW_TIME(TO_DATE('08-13-07 10:35:15','MM-DD-YY HH24:MI:SS'),'AST', 'PST') "Pacific Standard Time" FROM DUAL;
Pacific Standard Time
---------------------
13-AUG-07 06:35:15
(1 row)