Help Centre › Functions & Formulas
For a full list of available calculation functions, please read What calculation functions are supported.
This article describes the formula syntax and usage of the DAYS function. For information about the DAY function, see DAY function.
Description
Returns the number of days between two dates.
Syntax
DAYS(end_date, start_date)
The DAYS function syntax has the following arguments.
- end_date - Required. Start_date and End_date are the two dates between which you want to know the number of days.
- start_date - Required. Start_date and End_date are the two dates between which you want to know the number of days.
Remarks
- 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.
Example
| Formula | Description | Result |
| =DAYS("15-MAR-2021","1-FEB-2021") | Finds the number of days between the end date (15-MAR-2021) and start date (1-FEB-2021). When you enter a date directly in the function, you need to enclose it in quotation marks. Result is 42. | 42 |
| =DAYS(A2,A3) | Finds the number of days between the end date in A2 and the start date in A3 (364). | 364 |
Errors
For a full list of formula errors, please read Formula errors.