Hi I have a TextBox1, TextBox2 and TextBox3 control in my VB.NET Project.

TextBox1.Text = 9:30:33 AM
TextBox2.Text = 10:33:22 AM

I put this code into the Click Event of the Button1.

Dim TimeIn As DateTime
Dim TimeOut As DateTime

TimeIn = TextBox1.Text
TimeOut = TextBox2.Text

TextBox3.Text = Format((Int(TimeOut.Subtract(TimeIn).TotalMinutes) / 60), "hh:mm:ss")


But this code is doesn't work well!


The TextBox3 display "hh:mm:ss" and not "1:03:11"

What code should I write?