Hi, maybe someone can explain the datedif behaviour to me as I couldn't really find the explanations for my fairly simple problem.
I guess it can be debatable how the start and end dates should be treated for the purpose of construction the working of the function, i.e. whether these days should be counted (including/excluding) or not; but I accept the way it is as long as it is applied consistently, like:
(a) 1-Jan to 31-Jan = zero full months
(b) 1-Jan to 1-Feb = one full month
(c) 1-Jan to 28-Feb = one full month (jan but not feb)
(d) 1-Jan to 1-Mar = two full months (jan and deb)
So apparently the start date is counted (including) whethereas the end date is not (excluding).
Now when I do the following:
date1 = 31/12/2019
date2 = 31/5/2020
datedif gives five full months
However, the formula gives the same result for date2 = 30/6/2020 where I would expect the result to be a full six months.
I don't see how both results can be true if the formula calculates consistently because date2 = 31/7/2020 gives (presumably correctly) 7 full months again.
So this raises the question which actual date the results of full six months would fall on if it's not the last day of june.
As far as I can tell it has nothing to do with leap year treatment.
But apparently I am missing some part of the logic/working of the function.
Any help would be much appreciated.
Thanks
Bookmarks