I have two date fields and I need to determine the number of months between them. I couldn't find anything in the documentation nor could I find anything when searching the forum.
For example, I have 6/1/2009 and 12/31/2009 I need to return a 7 (number of months between the two dates inclusive of them).
Thank you.
Number of months between two dates
Number of months between two dates
Hello,
You can use the following code for approximate calculation of the difference in months (with some calculating error)
{Round((double)DateDiff(Date1,Date2).Days/30)}
For an accurate calculation you would need to realize your own method that calculates the difference between years, months, days and calculate the result.
Thank you.
You can use the following code for approximate calculation of the difference in months (with some calculating error)
{Round((double)DateDiff(Date1,Date2).Days/30)}
For an accurate calculation you would need to realize your own method that calculates the difference between years, months, days and calculate the result.
Thank you.
Number of months between two dates
That worked well enough. Thank you.
Number of months between two dates
Great!
Have a nice weekend!
Thank you.
Have a nice weekend!
Thank you.