Book Contents

Book Index

Next Topic

Home

TO_TIMESTAMP

The TO_TIMESTAMP function converts a string value or a UNIX/POSIX epoch value to a TIMESTAMP WITH TIME ZONE type.

Syntax

TO_TIMESTAMP ( { expression, pattern | unix-epoch } )

Semantics

 

expression

(CHAR or VARCHAR) is the string to convert

pattern

(CHAR or VARCHAR) specifies an output pattern string using the Template Patterns for Date/Time Formatting and/or Template Patterns for Numeric Formatting.

unix-epoch

(DOUBLE PRECISION) specifies some number of seconds elapsed since midnight UTC of January 1, 1970, not counting leap seconds. INTEGER values are implicitly cast to DOUBLE PRECISION.

Notes

Examples

TO_TIMESTAMP('05 Dec 2000', 'DD Mon YYYY')

TO_TIMESTAMP(200120400)

See Also

Template Pattern Modifiers for Date/Time Formatting