Here you can use the method
Public Shared Function MonthDifference(ByVal first As DateTime, ByVal second As DateTime) As Integer Return Math.Abs((first.Month - second.Month) + 12 * (first.Year - second.Year)) End Function
like this:
Dim Date1 As New DateTime(2010,5,6) Dim Date2 As New DateTime(2009,10,12) Dim NumOfMonths = MonthDifference(Date1, Date2)
source share