OPS/REXX Built-in Functions › DATE Function › Usage Notes for the DATE Function
Usage Notes for the DATE Function
Keep these notes in mind when using the DATE function:
- The standard REXX date format B is the number of whole days since and including January 1, 0001. This number does not include the current day, since it is not yet complete. For example, the following code would set var to today's date in format B:
var = DATE('B') + 1
And the following code would set var to the date two weeks from today in format B, assuming year end is not crossed:
var = DATE('B') + 15
- B format conversion decrements the source-date, even if it is supplied in B format. For example, the following code returns 731246 from the OPS/REXX DATE function:
var = DATE('B',731247,'B')
The same conversion in standard REXX does not decrement the date.
- When converting from B to any other format, standard REXX adds one day to the resulting date, whereas OPS/REXX does not.