timestamp-iso

Differences

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

Link to this comparison view

timestamp-iso [2015/09/23 20:27]
timestamp-iso [2015/09/23 20:27] (current)
Line 1: Line 1:
 +====== TIMESTAMP_ISO Function - PL/HQL Reference======
  
 +TIMESTAMP_ISO function converts a string or date expression to TIMESTAMP data type. 
 +
 +The string must be in '​YYYY-MM-DD HH24:​MI:​SS.FF'​ or '​YYYY-MM-DD'​ format.
 +
 +**Syntax**:
 +
 +<code language="​sql">​
 +TIMESTAMP_ISO(expression); ​
 +</​code>​
 +
 +**Return Data Type:**
 +
 +TIMESTAMP
 +
 +**Example 1:**
 +
 +Convert a string to TIMESTAMP:
 +
 +<code language="​sql">​
 +TIMESTAMP_ISO('​2015-03-12'​);​
 +--
 +2015-03-12 00:00:00
 +</​code> ​
 +
 +**Example 2:**
 +
 +Convert a date to TIMESTAMP:
 +
 +<code language="​sql">​
 +TIMESTAMP_ISO(DATE '​2015-03-12'​);​
 +--
 +2015-03-12 00:00:00
 +</​code> ​
 +
 +**Compatibility**:​ IBM DB2
 +
 +**Version**:​ PL/HQL 0.03
 +
 +See also:
 +  * [[date-literal|DATE Literal]]
 +  * [[timestamp-literal|TIMESTAMP Literal]]
 +  * [[date|DATE Function]]
 +  * [[to-timestamp|TO_TIMESTAMP Function]]