Determine the date which is a number of days from a reference date.
Determines the month, day, and year of a date which is a specified number of days from a reference date. The calculated date may be before or after the reference date. The calculated month, day, and year are returned to the calling procedure.
- INDATE
- Input date. The reference month, day, and year entered as integers (e.g., (3 14 91)). The year may be all four digits or the last two digits of the year (e.g., 1994 or 94).
- NDAYS
- Number of days. Number of days to increment the input date. A positive value indicates a day after the input date, while a negative value indicates a day before the input date.
- OUTDATE
- Output date. The month, day, and year returned as integers in character strings (e.g., ("03" "14" "91")). If the input year was four digits, the output year will be four digits also (e.g., ("03","14","1991")).
The month, day, and year of the previous day are determined and returned to the calling program as ("01" "15" "92"). The variable "odate" must have been previously declared as follows:
local odate type=(string,2) count=3
The month, day, and year of the previous day are determined and returned to the calling program as ("02" "19" "1998"). The variable "odate" must have been previously declared as follows:
local odate type=(string,4) count=3
The program increments or decrements the input date by converting to a Julian date, adding NDAYS days, and converting back to month, day, and year. OUTDATE is returned in the specified TAE variable.
An error was encountered sending the variable block to TAE. Contact the system administrator.
A fatal error was encountered. The message displayed preceding this message is the error that was encountered. Processing terminates.
local odate type=string count=3