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 this function is integer. 
 
  General Format
 
	  
	     FUNCTION DAY-TO-YYYYDDD ( argument-1 [argument-2] ) 
 
  Arguments
 
	   
	 - Argument-1 must be a positive integer less than 100,000. 
	 
- Argument-2 must be an integer. 
	 
- If argument-2 is omitted, the function is evaluated as though 50 were specified. 
	 
- The sum of the year at the time of execution and the value of argument-2 must be less than 10,000 and greater than 1699. 
	 
Returned Values
 
	   
	 - The equivalent arithmetic expression is: 
		(FUNCTION YEAR-TO-YYYY (YY, argument-2) * 1000 + nnn) 
		 where: 
		   YY = FUNCTION INTEGER (argument-1/1000)   nnn = FUNCTION MOD (argument-1, 1000) 
		 and where argument-1 of the INTEGER and MOD functions and argument-2 of the YEAR-TO-YYYY functions are the same as argument-1 and argument-2 of the DAY-TO-YYYYDDD function itself. 
		 
Notes