0

Hi,

Can anybody help me in getting the time differnece between 2 dates in time format HH:MM
as example need time differnec between 23Dec 20:35 and 24DEC 3:10.
I am able to get the difference for same date but failed to calculate for 2 dates.


Thanks

2
Contributors
1
Reply
4
Views
6 Years
Discussion Span
Last Post by Unhnd_Exception
0
Dim Date1 As New Date(2010, 12, 23, 20, 35, 0)
        Dim Date2 As New Date(2010, 12, 24, 3, 10, 0)

        Dim TimeDifference As TimeSpan = Date2.Subtract(Date1)

        MsgBox(TimeDifference.ToString)
        MsgBox(TimeDifference.Hours & ":" & TimeDifference.Minutes)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.