' Purpose : Function To Get the Difference between 2 Dates . ' In the Form of :
Day ,DayOfYear ,Hour ,Minute ,Month ,Quarter ,Second ,Weekday ,WeekOfYear ,Year ' Use :
DateInterval.Day / DateInterval.DayOfYear .... Public Sub DateDifference()
Dim DateDiffVal As Long
DateDiffVal = DateDiff(DateInterval.Year, DateTimePicker1.Value, DateTimePicker2.Value)
MsgBox("Date Difference Is : " & DateDiffVal, MsgBoxStyle.DefaultButton1, "Information")
End Sub