tech on the net
Home About Us Feedback Site Map

Microsoft

Access Excel Word

Database

SQL Oracle / PLSQL SQL Server MySQL MariaDB PostgreSQL

Web Development

HTML CSS Color Picker

Language

C Language

More

ASCII Table Linux UNIX Java Clipart Joke of the Moment

Other Sites

CheckYourMath BigActivities DigMinecraft
Share this page:

Oracle/PLSQL: NEW_TIME Function

Learn how to use the Oracle/PLSQL NEW_TIME function with syntax and examples.

Description

The Oracle/PLSQL NEW_TIME function returns a date in time zone1 to a date in time zone2.

Syntax

The syntax for the Oracle/PLSQL NEW_TIME function is:

NEW_TIME( date, zone1, zone2 )

Parameters or Arguments

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

The NEW_TIME function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i

Example

Let's look at some Oracle NEW_TIME function examples and explore how to use the NEW_TIME function in Oracle/PLSQL.

For example:

The following NEW_TIME function 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'.