Previous Topic Next topic Print topic


DAYSTODATE Function

Purpose

Returns a non-varying character string containing the date in a form p that corresponds to d days in Lilian format.

Syntax

DAYSTODATE (d, p, w)

Parameters

d is a string for the number of days in Lilian format. The value for d must have a computational type and is converted to FIXED BINARY(31,0) if necessary.

p is a supported date/time pattern. If not specified, DAYSTODATE uses the value YYYYMMDDHHMISS9999, which is the same format returned by DATETIME.

w is an integer expression value of the century window to be used for any two-digit year formats.

  • Any positive numeric value is treated as a year.
  • Negative or zero values are treated as an offset and subtracted from the current, system-supplied year.
  • If not specified, the value of w is the value specified in the -window compiler option.

Description

The DAYSTODATE function converts a number of days to a specified and supported date/time pattern string.

See the help topic Date/Time Built-in Functions for more information about Lilian format and supported date/time patterns.

Examples

See the example in the DAYS Function topic to see how DAYSTODATE can be used.

Restrictions

None.

Previous Topic Next topic Print topic