Notifications
Clear all
Power Pivot
3
Posts
2
Users
0
Reactions
66
Views
Topic starter
I'm looking for the Excel equivalent of DATEDIF. e.g
=DATEDIF("21/01/02","07/10/16","m")
In Excel 2016 DAX supports the DATEDIFF function =DATEDIFF("21/01/02","07/10/16",month)
but this is not supported in Excel 2010. Is there a simple way to achieve this?
Cheers,
Martin
Posted : 08/10/2016 1:15 am
Hi Martin,
This formula will round up:
=(YEAR([Date2])-YEAR([Date1]))*12+MONTH([Date2])-MONTH([Date1])
And this will round down:
=IF(DAY([Date2])>=DAY([Date1]),0,-1)+(YEAR([Date2])-YEAR([Date1]) ) * 12 + MONTH([Date2]) - MONTH([Date1])
Kind regards,
Mynda
Posted : 10/10/2016 6:03 am
Topic starter
Thanks Mynda.....This is what I need
Posted : 12/10/2016 9:03 pm