You could divide the result by 30 or 30.41666 (average days in a month) and use it as a very close estimate. I am sure you could devise a "table" of days in each month that could figure out if the month of the start date is July it has 31 days and the end date is December and has 31 days, but in the end you are converting a number of days into months and the average month has 30.14666 days in it.
We convert years into months (i.e. multiply by 12), then add the month to this value. This allows for yearly rollovers, such as Dec 2010-Jan 2011 is one month, not -11 months, and multiple years, such as June 2009-June 2011, which is 24 months, not zero months.
Try this. It will works fine to find the months differnece between two dates. If you want Day level difference you use "daysBetween" instead of "monthsBetween"
You could divide the result by 30 or 30.41666 (average days in a month) and use it as a very close estimate. I am sure you could devise a "table" of days in each month that could figure out if the month of the start date is July it has 31 days and the end date is December and has 31 days, but in the end you are converting a number of days into months and the average month has 30.14666 days in it.
You can use the formula Month(End Date)-Month(Start Date).
SAPOC, your formula is very close, but you forgot to account for years:
We convert years into months (i.e. multiply by 12), then add the month to this value. This allows for yearly rollovers, such as Dec 2010-Jan 2011 is one month, not -11 months, and multiple years, such as June 2009-June 2011, which is 24 months, not zero months.
Try this. It will works fine to find the months differnece between two dates.
If you want Day level difference you use "daysBetween" instead of "monthsBetween"