The DAYS function
Returns the number of days between two dates. The end date comes first, and the result is the same as subtracting the start date from the end date.
Syntax
DAYS(end_date, start_date)- end_date
- The later date.
- start_date
- The earlier date.
Examples
B1
=DAYS(1DATE(2024,12,25),2DATE(2024,3,15))| A | B | |
|---|---|---|
| 1 | 285 |
In plain words: Count the days from 2Mar 15, 2024 to 1Dec 25, 2024.
B1=DAYS(DATE(2024,3,1),DATE(2024,2,1))
| A | B | |
|---|---|---|
| 1 | 29 |
B1=DAYS("2024-03-15","2024-01-01")
| A | B | |
|---|---|---|
| 1 | 74 |
Questions
Why does DAYS give a negative number?
The dates are the wrong way around. DAYS wants the end date first, so =DAYS(end,start) is positive when the end date is later.
Is DAYS different from subtracting the dates?
=B2-A2 gives the same number when both cells hold dates. DAYS also reads dates written as text, such as "2024-03-15".