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

TO_TIMESTAMP converts a text expression to a value of TIMESTAMP.

Return Value

TIMESTAMP

Syntax

TO_TIMESTAMP(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('10-SEP-0614:10:10.123000','DD-MON-RRHH24:MI:SS.FF') returns the value 10-SEP-06 02.10.10.123000 PM.

TO_TIMESTAMP('10-AGOSTO-0714:10:10', 'DD-MON-RRHH24:MI:SS.FF', 'NLS_DATE_LANGUAGE=SPANISH') returns the value 10-AUG-07 02.10.10.000000 PM.