Timestamp Literal

Timestamp literals take the form Z"yyyy-mm-dd-hh.mm.ss.mmmmmm" where:

  • Z indicates that the literal is of type *Timestamp.
  • yyyy-mm-dd is a valid Gregorian calendar date (year, month of year, day of month).
  • hh.mm.ss.mmmmmm is a valid 24-hour time of day (hour, minute, second, and optional microsecond).

Remarks

yyyy-mm-dd-hh.mm.ss.mmmmmm must be enclosed by double-quote characters (see Examples below).

All digits are significant numeric decimal characters, e.g., for yyyy, year “614” must be specified as 0614.

The month is a number between 01 and 12 inclusive.

The day is a number between 01 an XX inclusive, where ‘XX’ is the total number of days in the specified month of the specified year.

The hour is a number between 00 and 23 inclusive.

The second is a number between 00 and 59 inclusive.

The microsecond is optional and if not specified will default to 000000.

Examples

Z"2024-07-22-17.15.05.000030"

Z"1970-01-01-00.00.00"

See Also

Numeric Literal

Hexadecimal Literal

Date Literal

Time Literal

Character Literal

Timestamp Data Type

Literals