TIMESTAMP_ISO

Click to skip syntax diagram
Read syntax diagramSkip visual syntax diagram>>-TIMESTAMP_ISO--(--expression--)-----------------------------><
 

Returns a timestamp value based on date, time, or timestamp argument. If the argument is a date, it inserts zero for the time and microseconds parts of the timestamp. If the argument is a time, it inserts the value of CURRENT DATE for the date part of the timestamp and zero for the microseconds part of the timestamp.

expression
The argument must be an expression that returns a value of one of the following built-in data types: a timestamp, a date, a time, a character string, or a graphic string.

If expression is a character or graphic string, it must not be a CLOB or DBCLOB and its value must be a valid string representation of a date, time, or timestamp. For the valid formats of string representations of dates, times, and timestamps, see String representations of datetime values.

The result of the function is a timestamp. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

When a string representation of a date, time, or timestamp is SBCS data with a CCSID that is not the same as the default CCSID for SBCS data, that value is converted to adhere to the default CCSID for SBCS data before it is interpreted and converted to a timestamp value.

When a string representation of a date, time, or timestamp is mixed data with a CCSID that is not the same as the default CCSID for mixed data, that value is converted to adhere to the default CCSID for mixed data before it is interpreted and converted to a timestamp value.

Note

Syntax alternatives: The CAST specification should be used for maximal portability. For more information, see CAST specification.

Example