INTEGER-OF-DAY

The INTEGER-OF-DAY function converts a date in the Gregorian calendar from Julian date form (YYYYDDD) to integer date form.

The function type is integer.

The function result is a seven-digit integer.

Format

Read syntax diagramSkip visual syntax diagramFUNCTION INTEGER-OF-DAY (argument-1 )
argument-1
Must be an integer of the form YYYYDDD whose value is obtained from the calculation (YYYY * 1000) + DDD, where:
  • YYYY represents the year in the Gregorian calendar. It must be an integer greater than 1600, but not greater than 9999.
  • DDD represents the day of the year. It must be a positive integer less than 367, provided that it is valid for the year specified.

The returned value is an integer that is the number of days that the date represented by argument-1 succeeds December 31, 1600 in the Gregorian calendar.

The INTDATE compiler option affects the starting date for the integer date functions. For details, see INTDATE in the Enterprise COBOL Programming Guide.