What I'm looking for is that when I select a specific time in each TimeSelector, I show the time difference between timeSelector1 and timeSelector2 in a textBox. I'm doing it this way:
Dim h1, m1, h2, m2, totalm, totalh As Int16
h1 = Convert.ToInt16(TimeSelector1.Hour)
h2 = Convert.ToInt16(TimeSelector2.Hour)
m1 = Convert.ToInt16(TimeSelector1.Minute)
m2 = Convert.ToInt16(TimeSelector2.Minute)
totalh = h2 - h1
totalm = m2 - m1
TextBox3.Text = totalh.ToString() + " : " + totalm.ToString()
This way, the final hour with the initial time remains and the result is:
9: 15-10: 20 = 1: 5 there's no problem there
Now if the values are:
9: 20-9: 15 = 1: -5 The result is 1 hour and 5 minutes.
What I really should calculate is that they are 55 minutes apart.