TIMESTAMP_ISO
The TIMESTAMP_ISO function returns a timestamp value that is based on a date, a time, or a timestamp argument.
The schema is SYSIBM.
If the argument is a date, TIMESTAMP_ISO inserts a value of zero for the time and the partial seconds parts of the timestamp. If the argument is a time, TIMESTAMP_ISO inserts the value of CURRENT DATE for the date part of the timestamp and a value of zero for the partial seconds part of the timestamp.
- expression
- An expression that returns a value of one of the following built-in
data types:
- a TIMESTAMP WITHOUT TIME ZONE
- 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, a time, or a timestamp. For the valid formats of string representations of dates, times, and timestamps, see String representations of datetime values.
If expression is a timestamp, the result of the function is the same timestamp data type with the same precision as expression. Otherwise, the result of the function is a TIMESTAMP (6) WITHOUT TIME ZONE.
The result can be null; if the argument is null, the result is the null value.
SELECT TIMESTAMP_ISO( DATE( '1965-07-27' ) )
FROM SYSIBM.SYSDUMMY1