Code:Dim date1 As New System.DateTime(2007, 3, 1, 20, 1, 0) Dim date2 As New System.DateTime(2007, 3, 2, 6, 0, 0) Dim diff1 As System.TimeSpan ' 20:01 - 06:00 ' diff1 gets 9 hours, and 58 minutes. diff1 = date2.Subtract(date1) Debug.Print("TotalHours " & diff1.Hours) Debug.Print("TotalMinutes " & diff1.Minutes)




Reply With Quote