TO_TIMESTAMP function
Converts a string to a timestamp using the specified format string.
Syntax
TO_TIMESTAMP(expression, format)
Arguments
expression: a
VARCHAR.format: a string made up of format elements.
Returns
A TIMESTAMP.
Examples
> SELECT TO_TIMESTAMP('2001-02-03 04:05:06', 'YYYY-MM-DD HH:MI:SS');
2001-02-03 04:05:06
> SELECT TO_TIMESTAMP('03 Feb 01 04:05:06 PM', 'DD Mon YY HH12:MI:SS PM')
2001-02-03 16:05:06