Function Reference: DATE
| Syntax | ||
| =DATE(year,month,day) | ||
| Purpose / Description | ||
| Returns a serial date number representing the date constructed from the year, month and day arguments. | ||
| Arguments | ||
| Name | Type | Description |
| year | number | A constant, reference or nested expression that returns the year to be used in the calculation. May be a value between 1900 and 9999. If the 1904 date system is in use, it may be a year between 1904 and 9999. |
| month | number | A constant, reference or nested expression that returns the month to be used in the calculation. If the value is <=0, the year represented by the serial date number returned is adjusted back in time from the given year. If the value >12, the year represented by the serial date number returned is adjusted forward in time from the given year. |
| day | number | A constant, reference or nested expression that returns the day to be used in the calculation. If the value is <=0, the month (and ultimately, if necessary, the year) represented by the serial date number returned is adjusted back in time from the given month. If the value >last day of the month, the month (and ultimately, if necessary, the year) represented by the serial date number returned is adjusted forward in time from the given month. |
| Return Values | ||
| Type | Specific Value | Description |
| number | The serial date number of the date calculated from the inputs year, month and day, adjusted backwards or forwards as required where the month and day arguments are out of the expected range. | |
| error | #VALUE! | If any of the arguments is not a number and cannot be coerced to a number or is a date outside the valid range 01-01-1900 to 131-12-9999 or for the 1904 date system, 01-01-1904 to 31-12-9999. |
| error | #NUM! | If the resulting date is a serial date number outside the range allowed - standard date system 0 to 2,958,465 - 1904 date system 0 to 2,957,003 This also applies when the calculated year < start year, after adjusting for months and days, the same adjustment of +1900 is not done, except where the entered values are lower than the start year. |
| error | Any errors referenced by arguments are returned due to propagation of error values. | |
| Notes / Comments / Advice / Warnings | ||
| Note: | If the standard date system is in use, If the year argument is less than 1900, then 1900 is added to the year. This allows two digit years to be interpreted as being in the 20th century, but three or four digit years become future dates from the current time period. | |
| Note: | If the 1904 date system is in use and the year argument is less than 1900, but greater than or equal to 4 then 1900 is added to the year. Years 0 to 3 are not supported, as adding 1900 generates a year number before that system commences. | |
| Examples: | Open / download sample workbook: DATE.xlsx | |