SECSTODATE

SECSTODATE returns a nonvarying character string containing the date in the date/time pattern specified by p that corresponds to d seconds (based on Lilian format).

Read syntax diagramSkip visual syntax diagram
>>-SECSTODATE-(-d--+-----------+-)-----------------------------><
                   '-,p-+----+-'     
                        '-,w-'       

d
The number of seconds (in Lilian format). d must have a computational type and is converted to FLOAT BIN(53) if necessary.
p
One of the supported date/time patterns. If omitted, p is assumed to be the default date/time pattern 'YYYYMMDDHHMISS999' (the default format returned by DATETIME).
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.






Published: 23 December 2018