Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to calculate the difference in months between two dates but needing to round to one decimal place. I found the below on the forum, but do not understand the format. It is returning the number rounded.
Needing the difference between today and EFFECTIVE_DATE rounded to 1 decimal place.
year(today(2))*12)+month(today(2))) - (((year(EFFECTIVE_DATE)*12)+month(EFFECTIVE_DATE)))
Thank you!
Check this link out by jagan: Calculating Months difference between two dates
I was hoping for an explanation of the formula I sent. Thanks anyway.
Since your formula just calculates difference between two integers (using sequential month numbers started in Jan 0000 for two dates), you can't calculate something with significant decimal places from that.
Here is a thread that covers some alternatives and also tries to explain the difficulty in defining a 'month' distance between dates:
How Do I Get the Number of Months Between Two Dates?
edit:
And if you want a more accurate calculation of date difference in Year,Month, Days, maybe use something like