Hello.
I have two dates, format dd/mm/yyyy.
I want to calculate the time difference between these two dates, and write it in a format such as this: years.months
So for example if the dates are: 01/02/2020 and 01/05/2022, then the difference would be 2 years and 3 months. Ideally I would want this written as “2.3”
I have gotten to the point where I found how to get the amount of months from the calculations, using these two functions. Assuming one date is in cell A1, the other in cell A2, I then put:
=DATEDIF(A2;B2;“m”)
This would give me 27 (months). Assuming this result ends up in C2, I can then follow that up with this:
=C2/12
This would give me (27/12) 2.25. Close to what I want, but ideally I want it as 2.3. Note that I do not want it as 2.3 because of 2.25 rounded up to 2.3, but rather because of 27/12 = 2 with the remainder of 3.
So: is there a way to have the result of a division expressed like that? (Integer.Remainder)