COBOL Manual for TNS and TNS/R Programs

Intrinsic Functions
HP COBOL Manual for TNS and TNS/R Programs522555-006
14-17
DATE-OF-INTEGER Function
DATE-OF-INTEGER Function
DATE-OF-INTEGER, an integer function, converts a date in the Gregorian calendar
from integer date form to standard date form (YYYYMMDD ).
argument
is a positive integer that represents a number of days since December 31, 1600, in
the Gregorian calendar.
The returned value is of the form YYYYMMDD, where YYYY represents the year in the
Gregorian calendar, MM represents the month of that year, and DD represents the day
of that month.
Example 14-9. DATE-OF-INTEGER Function
Code:
DISPLAY FUNCTION DATE-OF-INTEGER (1)
DISPLAY FUNCTION DATE-OF-INTEGER (365)
DISPLAY FUNCTION DATE-OF-INTEGER (36500)
DISPLAY FUNCTION DATE-OF-INTEGER (12345)
DISPLAY FUNCTION DATE-OF-INTEGER (100000)
Output:
16010101
16011231
17001207
16341019
18741016
( )
DATE-OF-INTEGERFUNCTION argument
VST428.vsd