I am using this formula in a query field to compute the number of months between two dates:
Months: Month(forms![Corporate Agent Productivity]!enddate-forms![Corporate Agent Productivity]!startdate)
If the enddate is 05/31/07 and the startdate is 04/01/07 it returns the expected "2" for the number of months.
But I've discovered that when you have two months in a row that contain 31days (JUL-AUG and DEC-JAN) it returns an extra month. example: If the enddate is 08/31/07 and the startdate is 07/01/07 the query returns "3" instead of "2"
Can anyone help with this problem?
Months: Month(forms![Corporate Agent Productivity]!enddate-forms![Corporate Agent Productivity]!startdate)
If the enddate is 05/31/07 and the startdate is 04/01/07 it returns the expected "2" for the number of months.
But I've discovered that when you have two months in a row that contain 31days (JUL-AUG and DEC-JAN) it returns an extra month. example: If the enddate is 08/31/07 and the startdate is 07/01/07 the query returns "3" instead of "2"
Can anyone help with this problem?