- 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
Date and Time - DAYS Function
Description
The DAYS function returns the number of days between two dates.
Syntax
DAYS (end_date, start_date)
Arguments
Argument | Description | Required/ Optional |
---|---|---|
End_date | Start_date and End_date are the two dates between which you want to know the number of days. | Required |
Start_date | Start_date and End_date are the two dates between which you want to know the number of days. | Required |
Notes
Excel stores dates as sequential serial numbers so that they can be used in calculations. By default, Jan 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39447 days after January 1, 1900
If both date arguments are numbers, DAYS uses EndDate–StartDate to calculate the number of days in between both dates.
If either one of the date arguments is text, that argument is treated as DATEVALUE (date_text) and returns an integer date instead of a time component.
If date arguments are numeric values that fall outside the range of valid dates, DAYS returns the #NUM! error value.
If date arguments are strings that cannot be parsed as valid dates, DAYS returns the #VALUE! error value.
Applicability
Excel 2013, Excel 2016