NET/MASTER Network Control Language (NCL) Reference Manual

DATECONV
Built-in Functions
4–38 106126 Tandem Computers Incorporated
DATECONV The DATECONV built-in function changes one NCL date format to a different NCL
date format. A variation to the date may be added or subtracted during the
conversion. Table 4-3 lists the date formats supported by NCL.
DATECONV(
informat
,
indate
,
outformat
[,
variation
] )
informat
specifies the format code of the date to be converted. This format code has the
same meaning as defined in the DATE built-in function. The century (C), day (D),
month (M), and weekday (W) formats are not supported for
informat
; see Table
4-3 for details regarding these formats.
indate
specifies the date to be converted. The format of this date must agree with the
value of
informat
.
outformat
specifies the format to which the date is to be converted. Any of the format codes
available in DATE may be used.
variation
specifies an optional adjustment value, in days. This must be a whole number,
either positive or negative. It is added to the input date (contained in
indate
)
before reformatting.
Considerations
Input formats that do not include the century are assumed to be 19
xx
if the year is
between 50 and 99, and assumed to be 20
xx
, if the year is between 00 and 49.
See also DATE and TIME. The DATE built-in function provides the current date
in one of the specified formats supported by NCL. The TIME built-in function
returns the current time in one of several formats.
Examples
In the following example, the date 18 NOV 1994 (normal format) is converted to 94229
(Julian format):
&A = N
&B = 18 NOV 1994
&C = J
&RESULT DATECONV(&A,&B,&C)