TO_TIMESTAMP Function
TO_TIMESTAMP converts a TIMESTAMP string to TIMESTAMPTZ.
Syntax
to_timestamp ('timestamp', 'format')
Arguments
- timestamp
-
A string that represents a time stamp value in the format specified by format.
- format
-
The format for the timestamp value. Formats that include a time zone (
TZ
,tz
, orOF
) are not supported as input. For valid time stamp formats, see Datetime Format Strings.
Return Type
TIMESTAMPTZ
Examples
The following example demonstrates using the T0_TIMESTAMP function to convert a TIMESTAMP string to a TIMESTAMPTZ
select sysdate, to_timestamp (sysdate, 'HH24:MI:SS') as seconds; timestamp |seconds -------------------|---------------------- 2018-05-17 23:54:51|0001-03-24 18:05:17.0