Dim diff1 As Period
DateTime.TimeFormat="hh:mm"
diff1 = DateUtils.PeriodBetween.Hours(DateTime.TimeParse("05:10"),DateTime.Time(DateTime.Now))
Label1.Text = diff1.Hours
Dim diff1 As Period
DateTime.TimeFormat="hh:mm"
diff1 = DateUtils.PeriodBetween(DateTime.TimeParse("05:10"), DateTime.Time(DateTime.Now))
Label1.Text = diff1.Hours
Dim diff1 As Period
DateTime.TimeFormat="HH:mm '<-- not "hh:mm"
diff1 = DateUtils.PeriodBetween(DateTime.TimeParse("05:10"), DateTime.Now) ' removed DateTime.Time
Label1.Text = diff1.Hours