Description
Use this function to return the count of days between two dates.
Syntax
DAYS("end_date","start_date")
Inputs
This function has the following arguments:
Name | Required | Valid input |
---|---|---|
end_date |
Yes | Last date of the range to be considered. This can be a cell reference, an integer date, or an explicit date in the format "DD/MM/YYYY" or "YYYY/MM/DD". A formula which results in one of these is also acceptable. Quotation marks are required for an explicit date. |
start_date |
Yes | First date of the range to be considered. This can be a cell reference, an integer date, or an explicit date in the format "DD/MM/YYYY" or "YYYY/MM/DD". A formula which results in one of these is also acceptable. Quotation marks are required for an explicit date. |
Examples
Sample data
A (end date) |
B (start date) |
C (result) |
---|---|---|
February 1, 2019 | 4/30/2018 | 277 |
April 23, 2019 | 5/31/2017 | 692 |
Sample formulas
Formula | Description | Display |
---|---|---|
=DAYS("2021/03/04","2020/03/06") |
Returns the number of days between the specified dates. | 363 |
=DAYS("01/12/2024",A2) |
Returns the number of days between the date specified in cell A2 and the included date. | 1725 |
Notes
- If an explicit date is used, it must be in quotation marks ("DD/MM/YYYY" or "YYYY/MM/DD").
- If two explicit dates are used, they must be in the same format ("DD/MM/YYYY" or "YYYY/MM/DD"), and both be in quotation marks.
- If either date isn't a valid integer date or in the format "DD/MM/YYYY" or "YYYY/MM/DD", DAYS returns the #VALUE! error.
- If
end_date
predatesstart_date
, the value will be negative. - This is an absolute count of days.
Related functions
DATE
DATEVALUE
DAY
DAYS
DAYS360
EDATE
EOMONTH
MONTH
NETWORKDAYS
NETWORKDAYS.INTL
WEEKDAY
WORKDAY
WORKDAY.INTL
YEAR
YEARFRAC