- Advanced Excel Functions Tutorial
- Advanced Excel Functions - Home
- Compatibility Functions
- Advanced Excel Functions - Cube
- Database Functions
- Date & Time Functions
- Engineering Functions
- Financial Functions
- Information Functions
- Advanced Excel Functions - Logical
- Lookup & Reference Functions
- Math & Trignometric Functions
- Statistical Functions
- Useful Resources
- Quick Guide
- Useful Resources
- Discussion
Advanced Excel - DATE Function
Description
The DATE function returns the serial number of a particular date.
Syntax
DATE (year, month, day)
Arguments
Argument | Description | Required/ Optional |
---|---|---|
year | The value of the year argument can include one to four digits. Excel interprets the year argument according to the date system your computer is using. By default, Microsoft Excel for Windows uses the 1900 date system. See Notes below. |
Required |
month | A positive or negative integer representing the month of the year from 1 to 12 (January to December). See Notes below. |
Required |
day | A positive or negative integer representing the day of the month from 1 to 31. See Notes below. |
Required |
Notes
Excel stores dates as sequential serial numbers so that they can be used in calculations. January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,447 days after January 1, 1900.
year
Microsoft recommends using four digits for the year argument to prevent unwanted results. For example, "07" could mean "1907" or "2007." Four digit years prevent confusion
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
month
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 the magnitude of 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
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 the magnitude that number of days, plus one, from the first day of the month specified. For example, DATE (2008, 1, -15) returns the serial number representing December 16, 2007.
Applicability
Excel 2007, Excel 2010, Excel 2013, Excel 2016