Det ligner almindelig DATEDIFF , det burde virke for dig:
SELECT
DateTest AS [Date],
DATEDIFF(MONTH, GETDATE(), DateTest) AS [MonthNo]
FROM #DateTest
Det ligner almindelig DATEDIFF , det burde virke for dig:
SELECT
DateTest AS [Date],
DATEDIFF(MONTH, GETDATE(), DateTest) AS [MonthNo]
FROM #DateTest