Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

E23381-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

TO_TIMESTAMP_TZ

TO_TIMESTAMP_TZ converts a text expression to a value of TIMESTAMPWITHTIMEZONE data type.

Return Value

TIMESTAMP WITH TIME ZONE

Syntax

TO_TIMESTAMP_TZ(char [, fmt [ 'nlsparam' ] ])

Arguments

char is a text expression to be converted.

fmt is a datetime model format specifying the format of char. The default date format is determined implicitly by the NLS_TERRITORY initialization parameter or can be set explicitly by the NLS_DATE_FORMAT parameter. For data type formats, refer to the Oracle Database SQL Language Reference.

nlsparam specifies the language in which month and day names and abbreviations given in char. This argument has this form:

'NLS_DATE_LANGUAGE = language' 

By default, char is in the session date language.

Examples

TO_TIMESTAMP_TZ('2006-03-26 7:33:00 -4:00', 'YYYY-MM-DD HH:MI:SS TZH:TZM') returns the value 26-MAR-06 07.33.00.000000 AM -04:00.

TO_TIMESTAMP_TZ('2006-AGOSTO-13 7:33:00 -4:00', 'YYYY-MONTH-DD HH:MI:SS TZH:TZM', 'NLS_DATE_LANGUAGE=SPANISH') returns the value 13-AUG-06 07.33.00.000000 AM -04:00.