Forum Discussion
alangibson
Apr 03, 2020Copper Contributor
DATEIF 30th v 31st of Month calculating months
Hi I am trying to calculate number of months between two dates. All works well using =DATEDIF(O4,P4,"m") eg 31/07/2019 to 31/08/2020 Returns 13 months However 31/07/2019 to 31/06/2020 Return...
alangibson
Apr 03, 2020Copper Contributor
Riny_van_Eekelen thank you.
Works a treat.
Its been bugging me for a few months now.
Couldnt work out why it was calculating correct some months and not others. Then i realised it was when i was calculating 30 v 31 etc
Made my week
linda2022
Feb 04, 2022Copper Contributor
Hi ,
Please help.
I did try to use the formula above, however it is still giving the wrong month.
For example : Start date: 1/1/2023 - End date 1/31/2028. Total should be 61 month, but it gives me 60 months only. My case is my start date is always 1st of the month, but the end date will need to be always end of the month (regardless 30 or 31 or for Feb it will be either 28 or 29)
is there away to fix this ? Thank you in advance
Please help.
I did try to use the formula above, however it is still giving the wrong month.
For example : Start date: 1/1/2023 - End date 1/31/2028. Total should be 61 month, but it gives me 60 months only. My case is my start date is always 1st of the month, but the end date will need to be always end of the month (regardless 30 or 31 or for Feb it will be either 28 or 29)
is there away to fix this ? Thank you in advance
- HansVogelaarFeb 04, 2022MVP
With the start date in A1 (the first day of a month) and the end date in B1 (the last day of another month), you can use
=DATEDIF(A1,B1+1,"m")
- linda2022Feb 04, 2022Copper ContributorThank you so much! It worked. I appreciated.