2.5.4.22 Date

The Date function returns a date, according to the Gregorian calendar, from values representing a year, month, and day.

ABNF:

 Date = val val val " DATE():128"

Required Arguments:

Name: Year

Type: vUnsignedInt

An argument that specifies a year. A value between 0 and 29 corresponds to the range of years between 2000 and 2029. A value between 30 and 100 corresponds to the range of years between 1930 and 2000. A value greater than 100 corresponds to that year. It MUST be less than or equal to 9999.

Name: Month

Type: vSignedInt

An argument that specifies an offset in months from December 1st of the previous year.

Name: Day

Type: vSignedInt

An argument that specifies an offset in days from the last day of the previous month.

Return Value:

Type: PtgDate, PtgErr

This function returns a PtgDate containing the date, according to the Gregorian calendar, represented by Year, Month, and Day. If the arguments specify a date before January 1st, 1899 or between January 1st, 1900 and November 30th, 1900 inclusively, the function returns a PtgErr with an error code of #NUM!. If either Month or Day cannot be interpreted as vSignedInt, the function returns a PtgErr with an error code of #VALUE!.