TO_DATE converts a text expression to a DATE data type in the specified format.
DATE
TO_DATE(char [, fmt [, 'nlsparam' ] ])
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 Reference.
nlsparam specifies the language in which month and day names and abbreviations are returned. This argument can have this form:
'NLS_DATE_LANGUAGE = language'
By default, the return value is in the session date language.
TO_DATE('October 13, 2006', 'MONTH DD, YYYY') returns the value 13-OCT-06.
Copyright © 2003, 2007, Oracle. All rights reserved.