date

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

date [2015/09/23 20:27]
date [2015/09/23 20:27] (current)
Line 1: Line 1:
 +====== DATE Function - PL/HQL Reference======
 +
 +DATE function converts an expression to DATE data type.
 +
 +**Syntax**:
 +
 +<code language="​sql">​
 +DATE(expression); ​
 +</​code>​
 +
 +**Return Data Type:**
 +
 +DATE
 +
 +**Example:​**
 +
 +Convert a string and timestamp to DATE:
 +
 +<code language="​sql">​
 +DATE('​2015-03-12'​);​
 +DATE('​2015'​ || '​-03-'​ || '​12'​);​
 +DATE(TIMESTAMP '​2015-03-12 10:​58:​34.111'​);​
 +</​code> ​
 +
 +**Compatibility**:​ IBM DB2
 +
 +**Version**:​ PL/HQL 0.03
 +
 +See also:
 +  * [[date-literal|DATE Literal]]
 +  * [[timestamp-literal|TIMESTAMP Literal]]
 +  * [[timestamp-iso|TIMESTAMP_ISO Function]]