Counting months between two dates
Posted on 2007-03-28
MS Access 2003 QUERY
Help! I need to calculate the number of months due based on the following criteria:
[Efective] = If [DriversEffective] datepart is prior to the 16th of any given month the count that month as the first month, otherwise begin month count the following month.
[EndDate] = If [DriversTermed] is null then [EndDate] = 1st of next month, otherwise, [EndDate] = [DriversTermed]
[EndDate] minus [Effective] (in number of months)
I need this in SQL so I can put it into a query. Any help is appreciated