INTEGER-OF-FORMATTED-DATE
The INTEGER-OF-FORMATTED-DATE function converts a date that is in a specified format to an integer date form.
The function type is integer.
- argument-1
- Must be a national, UTF-8, or an alphanumeric literal in either a date format or a combined date and time format. For details, see Date and time formats.
- argument-2
- Must be a data item of the same class as argument-1.
Returned values
The returned value is in the integer date form equivalent of the date represented by argument-2 when analyzed according to argument-1. A value in integer date form is a positive integer that represents a number of days succeeding 31 December, 1600 in the Gregorian calendar. It is based on a starting date of Monday, 1 January, 1601 and integer date 1 represents Monday, 1 January, 1601.
The INTDATE
compiler
option affects the starting date for the integer date functions. For
details, see INTDATE in
the Enterprise COBOL Programming Guide.
Example
If the format of the first argument is "YYYYMMDD" and the value for the second argument is "19950215", the returned value would be 143951. The same value would be returned if the format of the first argument is "YYYYMMDDThhmmss.ss+hhmm" and the value for the second argument is "19950215T05142781+0500".