This routine is provided for backward compatibility. Use 900-NBR-DAYS-IN-DATE-RNG instead.
The 500-DATE-COMPARE routine converts its two input dates to Julian format and calculates their difference.
Required Input
Field |
Type and length |
Definition |
DATE-1 |
N 8 |
The signed, 8-character numeric value for the first date. |
DATE-2 |
N 8 |
The signed, 8-character numeric value for the second date. |
If the input date century equals 00, it changes to 19 or 20. See Century Parameter Processing.
Output
Field |
Type and length |
Definition |
DAYS-DIFFERENCE |
N 6 |
Set to number of days difference between DATE-1 and DATE-2; the result is positive if DATE-1 is less than DATE-2. |
Example
* Check for date differences.
MOVE first-date TO DATE-1.
MOVE second-date TO DATE-2.
PERFORM 500-DATE-COMPARE.
|