Si tengo 2 DateTimePicker:
D1 = Con la hora 20h:30m
D2= Con la hora 22h:00m
como podria hacer para calcular la diferencia de tiempo de ambos datetimepicker y me lo mande a un label
En este caso seria:
Lbl.text= 1h:30
Tan solo tienes que hacer esto:
Dim timeDiff As TimeSpan = (DateTimePicker1.Value - DateTimePicker2.Value)
Dim timeFormat As String = timeDiff.ToString("hh\h\:mm") ' 01h:30
Console.WriteLine(timeFormat)
Saludos
Muchas Gracias :D