IBM Extension
IBM Extension
DAY-TO-YYYYDDD
The DAY-TO-YYYYDDD function converts argument-1 from the form YYnnn to the form YYYYnnn. Argument-2, when added to the year at the time of execution, defines the ending year of a 100-year interval, or sliding window, into which the year of argument-1 falls.
The type of the function is integer.
- argument-1
- Must be a positive integer less than 100000.
- argument-2
- Must be an integer. If argument-2 is omitted, the function will be evaluated with a value of 50 for argument-2. At the time of execution, the sum of the year with argument-2 will be less than 10000, and greater than 1699.
The equivalent arithmetic expression is:
(FUNCTION YEAR-TO-YYYY (YY, argument-2) * 1000 + nnn)
where YY = (argument-1/1000) truncated to an integer value
nnn = argument-1 modulus 1000
This function supports a sliding window algorithm. See YEAR-TO-YYYY for a discussion of how to specify a fixed window.
Related Information
End of IBM Extension
