Oracle/PLSQL: New_Time Function
In Oracle/PLSQL, the new_time function returns a date in time zone1 to a date in time zone2.
The syntax for the new_time function is:
new_time( date, zone1, zone2 )
zone1 and zone2 can be any of the following values:
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
Applies To:
- Oracle 9i, Oracle 10g, Oracle 11g
For example:
The following new_time example converts an Atlantic Standard Time into a Mountain Standard Time:
new_time (to_date ('2003/11/01 01:45', 'yyyy/mm/dd HH24:MI'), 'AST', 'MST')
This example would return '2003/10/31 10:45:00 PM'.
