Calculate the years and months from two given dates
I want to calcuate the years and months in decimal from two dates given, for example i have 02-31-2019 earlier date and current date 02-07-2022 , how i calculate the difference? i want the answer 2.6 means 2 years and 6 months. how i calculate this?
You can use the Java action “MonthsBetween” from the community commons (MarketPlace Module ) and then divide the outcome by 12 and floor it for the number of years and use the function “mod” 12 for the remaining months.