I need to calculate the number of FULL month in SQL, i.e.
- 2009-04-16 to 2009-05-15 => 0 full month
- 2009-04-16 to 2009-05-16 => 1 full month
- 2009-04-16 to 2009-06-16 => 2 full months
I tried to use DATEDIFF, i.e.
SELECT DATEDIFF(MONTH, '2009-04-16', '2009-05-15')
but instead of giving me full months between the two date, it gives me the difference of the month part, i.e.
anyone know how to calculate the number of full months in SQL Server?