The function below is to calculate the difference between two days. The result will be in days, and it can be zero if the two days are the same.

VB.NET

    Function calculateDiffDates(ByVal StartDate As DateTime, ByVal EndDate As DateTime) As Integer
        Dim diff As Integer
        diff = (EndDate - StartDate).TotalDays
        Return diff
    End Function

 

difference between 2 dates vb.net

Last modified: March 6, 2019

Comments

Greate post. Keep posting such kind of information on your blog.
Im really impressed by it.

Write a Reply or Comment

Your email address will not be published.