Hello,
I have two DateTimePickers on my form (They are formatted to only show the time) and would like to get the number of hours difference between the two times.
I'm using the code below which appears to work fine if it is whole hours, but not if it is only for say half an hour :
What am I doing wrong please ?Code:Dim Hours As Double Hours = DateDiff(DateInterval.Hour, dtpFrom.Value, dtpTo.Value) txtHours.Text = Hours




Reply With Quote