Timestamp strings

A string representation of a timestamp is a character or a Unicode graphic string that starts with a digit and has a length of at least 16 characters.

The complete string representation of a timestamp has one of the following forms:

Table 1. Formats for String Representations of Timestamps
Format Name Time Format Example
ISO timestamp 'yyyy-mm-dd hh:mm:ss.nnnnnn' '1990-03-02 08:30:00.010000'
IBM® SQL 'yyyy-mm-dd-hh.mm.ss.nnnnnn' '1990-03-02-08.30.00.010000'
14–character form 'yyyymmddhhmmss' '19900302083000'

Trailing blanks can be included. Leading zeros can be omitted from the month, day, hour, and second part of the timestamp when using the timestamp form with separators. Trailing zeros can be truncated or omitted entirely from microseconds. If you choose to omit any digit of the microseconds portion, an implicit specification of 0 is assumed. Thus, 1990-3-2-8.30.00.10 is equivalent to 1990-03-02-08.30.00.100000.

A timestamp whose time part is 24.00.00.000000 is also accepted.