Date() function

The DATE function is a built-in function in Excel that is categorized as a Date/Time Function. It converts a supplied year, month and day into an Excel date. It is useful for assembling dates that need to change dynamically based on other values in a worksheet.

Syntax

The syntax for the DATE function in Microsoft Excel is:

=DATE( year, month, day )

Parameters or Arguments

year

A number that is between one and four digits that represents the year.

month

A number representing the month value. If the month value is greater than 12, then every 12 months will add 1 year to the year value. This means that DATE(2016,13,4) is equal to DATE(2017,1,4) and DATE(2016,25,4) is equal to DATE(2018,1,4) … and so on.

day

A number representing the day value. If the day value is greater than the number of days in the month specified, then the appropriate number of months will be added to the month value.

Returns

  • The DATE function returns a serial date value. A serial date is how Excel stores dates internally and it represents the number of days since January 1, 1900.
  • If the year is greater than 9999, the DATE function will return the #NUM! error.

Date Function Examples

Column D of the following spreadsheet shows the Date function applied to different sets of values.

Formula

Result

Common Errors

#NUM! – Occurs if the supplied year argument is < 0 or ≥ 10000.
#VALUE! – Occurs if any of the supplied arguments are non-numeric.

Note

  • If the year is between 0 and 1899, the year value is added to 1900 to determine the year.
  • If the year is between 1900 and 9999, the DATE function uses the year value as the year.