DATE

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.

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

Example

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

How?

  1. Create a blank spreadsheet.
  2. Select the example in the Help topic.

    Selecting example from Help

    Selecting an example from Help

  3. Press CTRL+C.
  4. In the spreadsheet, select cell A1, and press CTRL+V.
  5. To switch between viewing the formula that returns the result and the result in the cell, select the cell and press F2 and then ENTER, or click Commands and Options on the spreadsheet toolbar, click the Formula tab, and look in the Formula in active cell (active cell) box.
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 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.