DB2 Version 9.7 for Linux, UNIX, and Windows

TIMESTAMP_ISO scalar function

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

The schema is SYSFUN.

Returns a timestamp value based on a date, time, or timestamp argument. If the argument is a DATE, it inserts zero for all the time elements. If the argument is a TIME, it inserts the value of the CURRENT DATE special register for the date elements, and zero for the fractional time element.

The expression must return a value that is a built-in CHAR, VARCHAR, DATE, TIME, or TIMESTAMP data type. In a Unicode database, if a supplied argument has a GRAPHIC or VARGRAPHIC data type, it is first converted to a character string before evaluating the function. A string expression must return a valid character string representation of a date or timestamp.

The TIMESTAMP_ISO function is generally defined as deterministic. If the first argument has the TIME data type, then the function is not deterministic because the CURRENT DATE is used for the date portion of the timestamp value.

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