To get Hour from the DateTimePicker Value use the following code :
Dim _hour As Int32 = DateTimePicker1.Value.Hour
Use the following code :
Dim d1 As Int32 = Me.DateTimePicker1.Value.Hour
Dim d2 As Int32 = Me.DateTimePicker2.Value.Hour
If d2 <= d1 Then
TextBox12.Text = " ON-TIME"
ElseIf d2 > d1 Then
TextBox12.Text = " DELAY" & (d2 - d1) & "Hours"
End If
I hope it will help you. :)