Returns the number of days between two dates
DAYS(enddate, startdate)
startdate and enddate may be dates as numbers or text (which is converted to number form). DAYS returns enddate - startdate. The result may be negative.
DAYS("2008-03-03", "2008-03-01")
returns 2, the number of days between 1March08 and 3March08.
DAYS(A1, A2)
where cell A1 contains the date 2008-06-09 and A2 contains 2008-06-02 returns 7.
Let's consider a simple project tracking spreadsheet for a marketing campaign. We have a table with various tasks, their start dates, and their end dates. We want to calculate the duration of each task in days.
Here is a table showing the tasks for a marketing campaign:
Task ID | Task Name | Start Date | End Date | Duration (Days) | ||
|---|---|---|---|---|---|---|
A | B | C | D | E | ||
1 | 101 | Create social media content | 3/1/2024 | 3/15/2024 | 14 | |
2 | 102 | Design email templates | 3/5/2024 | 3/12/2024 | 7 | |
3 | 103 | Launch ad campaign | 3/15/2024 | 3/31/2024 | 16 | |
4 | 104 | Analyze campaign performance | 4/1/2024 | 4/10/2024 | 9 |
In this table, the "Duration (Days)" column is calculated using the DAYS function. The formula would be:
DAYS(End Date, Start Date)
For Task 101, the formula would be DAYS("2024-03-15", "2024-03-01"), which returns 14.
For Task 102, the formula would be DAYS("2024-03-12", "2024-03-05"), which returns 7.
For Task 103, the formula would be DAYS("2024-03-31", "2024-03-15"), which returns 16.
For Task 104, the formula would be DAYS("2024-04-10", "2024-04-01"), which returns 9.
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof