MICROSECSTODATE

MICROSECSTODATE returns a NONVARYING character string, which contains the date in a specified date/time pattern. The specified date/time pattern corresponds to the number of microseconds.

Read syntax diagramSkip visual syntax diagramMICROSECSTODATE(m, p, w)
m
Specifies the number of microseconds (in Lilian format). m must have a computational type and is converted to FIXED BIN(63) if necessary.
p
Specifies one of the supported date/time patterns. If p is omitted, it is assumed to be the TIMESTAMP pattern, namely 'YYYY-MM-DD-HH.MI.SS.999999'.
w
Specifies an expression (such as 1950) that can be converted to an integer. If negative, it specifies an offset to be subtracted from the value of the year when the code runs. If omitted, w defaults to the value specified in the WINDOW compile-time option.

The allowed patterns are listed in Table 2. For an explanation of Lilian format, see Date/time built-in functions.