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_DATE

TO_DATE converts a text expression to a DATE data type.

Return Value

DATE

Syntax

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

Arguments

char is a text expression that represents a date.

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 of char. This argument can have this form:

'NLS_DATE_LANGUAGE = language' 

By default, char is in the session date language.

Examples

TO_DATE('October 13, 2008', 'MONTH DD, YYYY') returns the value 13-OCT-08.

TO_DATE('13 Octubre 2008', 'dd month yyyy', 'NLS_DATE_LANGUAGE=SPANISH') also returns the value 13-OCT-08