The CURRENT-DATE function returns a 21-character alphanumeric value that represents the calendar date, time of day, and local time differential factor provided by the system on which the function is evaluated. The type of this function is alphanumeric.
|1-4||Four numeric digits of the year in the Gregorian calendar.|
|5-6||Two numeric digits of the month of the year, in the range 01 through 12.|
|7-8||Two numeric digits of the day of the month, in the range 01 through 31.|
|9-10||Two numeric digits of the hours past midnight, in the range of 00 through 23.|
|11-12||Two numeric digits of the minutes past the hour, in the range 00 through 59.|
|13-14||Two numeric digits of the seconds past the minute, in the range 00 through 59.|
|15-16||Two numeric digits of the hundredths of a second past a second, in the range 00 through 99. The value 00 is returned if the system on which the function is evaluated does not have the facility to provide the fractional part of a second.|
|17||The character '0'. This is reserved for future use.|
|18-19||The characters '00'. This is reserved for future use.|
|20-21||The characters '00'. This is reserved for future use|
MOVE FUNCTION CURRENT-DATE (1:4) TO YEARDATE.