TIMESTAMP_ISO scalar function

Returns a timestamp value based on a date, time, or timestamp argument.

Read syntax diagramSkip visual syntax diagramTIMESTAMP_ISO(expression )

The schema is SYSFUN.

expression
An expression that returns a value of one of the following built-in data types: 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.

If the argument is a date value, TIMESTAMP_ISO inserts zero for all the time elements. If the argument is a time value, TIMESTAMP_ISO inserts the value of the CURRENT DATE special register for the date elements, and zero for the fractional seconds element. The result of the function is a TIMESTAMP(6). The result can be null; if the argument is null, the result is the null value.

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.