Reference Guide > TDV Support for SQL Functions > TDV-Supported Convert Functions > PARSE_TIMESTAMP
 
PARSE_TIMESTAMP
The PARSE_TIMESTAMP function is similar to <xHyperLink>PARSE_DATE except that PARSE_TIMESTAMP converts a string representing a DATE or DATETIME into a TIMESTAMP value.
Syntax
PARSE_TIMESTAMP (timestamp_string, format_string)
Examples
PARSE_TIMESTAMP ('2004-4-4 12:59:58.987654321', 'yyyy-mm-dd hh:mi:ss.ff9')
 
The fractional-seconds designation (ff) can be followed by an integer value from 1 to 9, indicating the number of decimal places to return.
PARSE_TIMESTAMP ('MARCH 06, 1923 03:59:31 pm', 'MONTH dd, yyyy hh:mi:ss am')
 
This results in a TIMESTAMP value of 1923-03-06 15:59:31.
PARSE_TIMESTAMP ('MARCH 06, 1923 23:59:31', 'MONTH dd, yyyy hh24:mi:ss')
 
This results in a TIMESTAMP value of 1923-03-06 23:59:31.