TO_TIMESTAMP converts a text expression to a value of TIMESTAMP.

Return Value



TO_TIMESTAMP(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 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.


TO_TIMESTAMP('10-SEP-0614:10:10.123000','DD-MON-RRHH24:MI:SS.FF') returns the value 10-SEP-06 PM.

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