This shows you the differences between two versions of the page.
— |
date-literal [2015/09/23 20:27] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DATE Literal - PL/HQL Reference ====== | ||
+ | |||
+ | DATE literal allows you to specify a date constant using a string in 'YYYY-MM-DD' format. Then you can use this date value in any expression that expects a DATE data type. | ||
+ | |||
+ | **Examples**: | ||
+ | |||
+ | <code language=sql> | ||
+ | DATE '2014-12-20' | ||
+ | DATE '2014-12-20' + 1 -- Result: 2014-12-21 of type DATE | ||
+ | DATE '2014-12-20' - 1 -- 2014-12-19 | ||
+ | </code> | ||
+ | |||
+ | **Compatibility:** Oracle, IBM DB2 and Teradata | ||
+ | |||
+ | **Version**: PL/HQL 0.01 | ||
+ | |||
+ | See also: | ||
+ | |||
+ | * [[timestamp-literal|TIMESTAMP Literal]] | ||
+ | * [[interval|INTERVAL Expressions]] | ||