DATE

MS Excel Spreadsheet

See Also

Returns the sequential serial number that represents a particular date.

Syntax

DATE(year,month,day)

Year    The year argument can be one to four digits.

  • If year is between 0 (zero) and 1899 (inclusive), the value is added 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), the value is used as the year. For example, DATE(2008,1,2) returns January 2, 2008.

Month    is a number representing the month of the year. 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.

Day    is a number representing the day of the month. 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.

Remarks

  • Dates are stored as sequential serial numbers so they can be used in calculations. By default, December 31, 1899 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
  • 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 spreadsheet.

ShowHow?

Year Month Day
2008 1 1
Formula Description (Result)
=DATE(A2,B2,C2) Serial date for the date above (1/1/2008 or 39448)

Note  If you want to change the display of the result from a serial number to a date format or vice versa, select the cell and click Commands and Options Button image on the toolbar. Click the Format tab and then select the format you want in the Number Format box. To view the date as a serial number, apply the General number format.