how to minus two times

karthikeyan

Member
Joined
Oct 22, 2005
Messages
12
Programming Experience
Beginner
i have time as 10-10-20061:00 am and 11-10-2006 12:00pm and i want to find time diffreance between these two times .i am not using railway time i am using 12hr time format,can any one give me coding for this please
 
VB.NET:
        Dim Date1 As Date = #10/10/2006 1:00:00 AM#
        Dim Date2 As Date = #11/10/2006 12:00:00 PM#
        Dim Time As TimeSpan = Date2.Subtract(Date1)
        MsgBox(Time.Hours & " hour(s) and " & Time.Minutes & " minutes.")
 
Back
Top