Function To Get the Difference between 2 Dates in different Formats


Function To Get the Difference between 2 Dates .

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


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: