ExcelFunctions.net Logo

The Excel DATE Function

Home » Excel-Built-In-Functions » Excel-Date-And-Time-Functions » Excel-Date-Function

Search this site:
Custom Search
Related Functions: 

Basic Description

The Excel DATE function, when supplied with integers representing a year, month and day, returns an Excel date.

The format of the function is:

DATE( year, month, day )

where the arguments are integer values, representing the year, month and day of the date to be returned.

Typically, the month will be between 1 and 12 and the day will be between 1 and 31. However, these value can extend below or above these ranges, in which case, they behave as follows:

month -

If the supplied month argument is negative or is greater than 12, the date extends back or forward, into the previous or following year. For example:

DATE( 2009, -1, 1 )=1st November 2008
DATE( 2009, 0, 1 )=1st December 2008
DATE( 2009, 1, 1 )=1st January 2009
DATE( 2009, 2, 1 )=1st February 2009
.
.
.
.
.
.
.
.
.
DATE( 2009, 12, 1 )=1st December 2009
DATE( 2009, 13, 1 )=1st January 2010
DATE( 2009, 14, 1 )=1st February 2010
day -

If the supplied day argument is negative or is greater than 31, the date extends back or forward, into the previous or following month. For example:

DATE( 2009, 6, -1 )=30th May 2009
DATE( 2009, 6, 0 )=31st May 2009
DATE( 2009, 6, 1 )=1st June 2009
DATE( 2009, 6, 2 )=2nd June 2009
.
.
.
.
.
.
.
.
.
DATE( 2009, 6, 30 )=30th June 2009
DATE( 2009, 6, 31 )=1st July 2009
DATE( 2009, 6, 32 )=2nd July 2009

Note also, that the year, month and day arguments can be supplied to the Date function either directly, as values returned from other formulas, or as references to cells containing values.


Excel Date Function Examples

The following spreadsheet shows the Date function applied to 3 different data sets.

The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right.

 Formulas:
Examples of use of the Excel Date Function
 Results:
Excel Date Function Results

Note that the above resulting dates are formatted in the UK date format, dd/mm/yyyy. Read more about Excel formatting here.


Further information and examples of the Excel Date function can be found on the Microsoft Office website.


Trouble Shooting

Some Excel users experience the following common problem with the Excel Date function:

Common Date Function Problem

The Excel Date function returns a number instead of a date

Possible Reason

This is likely to be due to the formatting of the cell. I.e. the function has actually returned the correct value, but the cell is displaying the date serial number, instead of the date format.

To correct this,

  • Highlight the cell(s) with the wrong formatting
  • Right click with the mouse
  • Select the Format Cells ... option and ensure the Number tab is selected
  • Under the Category heading, select the option Date and click OK

- See the Excel Formatting page for more details on formatting in Excel.






Valid XHTML 1.0 Transitional

Disclaimer Privacy Policy

Copyright © 2008-2010 ExcelFunctions.net