DATE

Returns the sequential serial number that represents a particular date. If the cell format was General before the function was entered, the result is formatted as a date.

Syntax

DATE(year,month,day)

Year     The year argument can be one to four digits. Microsoft Excel interprets the year argument according to the date system you are using. By default, Excel for Windows uses the 1900 date system; Excel for the Macintosh uses the 1904 date system.

ShowFor the 1900 date system

  • If year is between 0 (zero) and 1899 (inclusive), Excel adds that value to 1900 to calculate the year. For example, DATE(108,1,2) returns January 2, 2008 (1900+108).
  • If year is between 1900 and 9999 (inclusive), Excel uses that value as the year. For example, DATE(2008,1,2) returns January 2, 2008.
  • If year is less than 0 or is 10000 or greater, Excel returns the #NUM! error value.

ShowFor the 1904 date system

  • If year is between 4 and 1899 (inclusive), Excel adds that value to 1900 to calculate the year. For example, DATE(108,1,2) returns January 2, 2008 (1900+108).
  • If year is between 1904 and 9999 (inclusive), Excel uses that value as the year. For example, DATE(2008,1,2) returns January 2, 2008.
  • If year is less than 4 or is 10000 or greater or if year is between 1900 and 1903 (inclusive), Excel returns the #NUM! error value.

Month     is a positive or negative integer representing the month of the year from 1 to 12 (January to December).

  • If month is greater than 12, month adds that number of months to the first month in the year specified. For example, DATE(2008,14,2) returns the serial number representing February 2, 2009.
  • If month is less than 1, month subtracts that number of months plus 1 from the first month in the year specified. For example, DATE(2008,-3,2) returns the serial number representing September 2, 2007.

Day     is a positive or negative integer representing the day of the month from 1 to 31.

  • If day is greater than the number of days in the month specified, day adds that number of days to the first day in the month. For example, DATE(2008,1,35) returns the serial number representing February 4, 2008.
  • If day is less than 1, day subtracts that number of days plus one from the first day in the month. For example, DATE(2008,1,-15) returns the serial number representing December 16, 2007.

Remarks

  • Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900. Excel for the Macintosh uses a different date system as its default.
  • The DATE function is most useful in formulas where year, month, and day are formulas, not constants.

Example

The example may be easier to understand if you copy it to a blank worksheet.

ShowHow to copy an example

  • Create a blank workbook or worksheet.
  • Select the example in the Help topic.

 Note   Do not select the row or column headers.

Selecting an example from Help

Selecting an example from Help
  • Press CTRL+C.
  • In the worksheet, select cell A1, and press CTRL+V.
  • To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
 
1
2
A B C
Year Month Day
2008 1 1
Formula Description (Result)
=DATE(A2,B2,C2) Serial date for the date above, using the 1900 date system (1/1/2008 or 39448)

 Note   To view the number as a serial number, select the cell and click Cells on the Format menu. Click the Number tab, and then click General in the Category box.

 
 
Applies to:
Excel 2003