This shows you the differences between two versions of the page.
timestamp-literal [2015/09/23 20:27] |
timestamp-literal [2015/09/23 20:27] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== TIMESTAMP Literal - PL/HQL Reference ====== | ||
+ | TIMESTAMP literal allows you to specify a timestamp constant using a string in 'YYYY-MM-DD HH:MI:SS.FFF' or 'YYYY-MM-DD-HH.MI.SS.FFF' format. | ||
+ | |||
+ | You can use this timestamp value in any expression that expects a TIMESTAMP data type. | ||
+ | |||
+ | **Examples**: | ||
+ | |||
+ | <code language=sql> | ||
+ | TIMESTAMP '2015-03-03 11:39:31.123' | ||
+ | |||
+ | TIMESTAMP '2015-03-03-11.39.31.123' -- DB2 syntax | ||
+ | </code> | ||
+ | |||
+ | **Notes:** | ||
+ | |||
+ | * Fractional part is optional | ||
+ | |||
+ | **Compatibility:** Oracle, IBM DB2. | ||
+ | |||
+ | **Version**: PL/HQL 0.03 | ||
+ | |||
+ | See also: | ||
+ | |||
+ | * [[date-literal|DATE Literal]] | ||
+ | * [[interval|INTERVAL Expressions]] | ||
+ | * [[timestamp-iso|TIMESTAMP_ISO Function]] | ||
+ | * [[to-timestamp|TO_TIMESTAMP Function]] |