Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim starttime As DateTime = DateTimePicker1.Value
Dim endtime As DateTime = DateTimePicker2.Value
Dim results As TimeSpan = starttime - endtime
TextBox1.Text = results.Duration.ToString
End Sub
|