The DATE-OF-INTEGER function converts a date in the Gregorian calendar from integer date form to standard date form (YYYYMMDD).
The type of this function is integer.
Format
FUNCTION DATE-OF-INTEGER (argument-1)
Argument
argument-1 is a positive integer that represents a number of days succeeding December 31, 1600, in the Gregorian calendar.
Returned values
The returned value represents the ISO Standard date equivalent of the integer specified in argument-1.
YYYY represents a year in the Gregorian calendar, MM represents the month of that year, and DD represents the day of that month.
The error default value is 0.
See also: DAY-OF-INTEGER, INTEGER-OF-DATE, INTEGER-OF-DAY, CURRENT-DATE, WHEN-COMPILED
Example 9-10
... DATA DIVISION. WORKING-STORAGE SECTION. 01 A-DATE PIC 9(8). PROCEDURE DIVISION. P1 SECTION. MAIN. COMPUTE A-DATE = FUNCTION DATE-OF-INTEGER (50000). DISPLAY A-DATE UPON T. STOP RUN.
Result: 17371123
The 50000th day as of 31.12.1600 was 23.11.1737.