Forum Discussion
John9210
Feb 18, 2023Copper Contributor
Days between two dates
Subtracting one date from another is supposed to give the number of days in between. However, taking a simple case, subtracting 3/5/23 from 3/8/23 yields 3 days. However there are actually 2 days, not 3, between the them: March 6 and March 7. Am I interpreting the calculation incorrectly?
- Riny_van_EekelenPlatinum Contributor
John9210 By default, Excel does not count the start date but it includes the end date. Thus 6-7-8 being three days Others might argue that there are 4 days as they want to include the start date. They have to add 1 to the default result. And if you want to exclude the end date as well you need to deduct 1.
So, understand what Excel gives you and adjust to your own needs.
The meaning of the subtraction is: it is 3 days from the 5th to the 8th: 5 to 6, 6 to 7, 7 to 8.
If you want to count the number of days "in between" (excluding the start date and end date), use
=MAX(enddate-startdate-1, 0)