Forum Discussion
rreiser68
Dec 06, 2021Copper Contributor
calculate date difference
I am looking for a formula to calculate the difference between two dates, while controlling for the year. I have a series of pairs of dates (A1,B1) (A2,B2)... The first date always precedes, or is ...
rreiser68
Dec 07, 2021Copper Contributor
Riny_van_Eekelen
This is VERY helpful. However, I don't quite understand why there is a +1 at then end of the formula. Could you possibly explain it to me?
This is VERY helpful. However, I don't quite understand why there is a +1 at then end of the formula. Could you possibly explain it to me?
mtarler
Dec 08, 2021Silver Contributor
I believe the +1 is to include the start/end dates. So 2021-01-05 - 2021-01-03 would result in 2 (basically 5-3=2) but you actually have the 3rd, 4th, and 5th so the +1 is needed.