Sub Test
DateTime.DateFormat = "dd/mm/yyyy"
Dim data1 As Long = DateTime.DateTimeParse("26/04/2020", "01:00:00")
Dim data2 As Long = DateTime.DateTimeParse("29/04/2020", "23:10:15")
Dim per As Period
per = DateUtils.PeriodBetween(data1, data2)
Log("Years " & per.Years)
Log("Month " & per.Months)
Log("Days " & per.Days)
Log("Hours " & per.Hours)
Log("Minutes " & per.Minutes)
Log("Seconds " & per.Seconds)
'0 anni, 0 mesi, 3 giorni, 22 ore, 10 min, 15 sec
Dim Ore As Int = DateTime.GetHour(data2 - data1)
Log("Ore: " & Ore)
' Darà 23 ore, quindi arrotondando per eccesso.
Log($"Ore: $1.0{Abs(data2 - data1) / DateTime.TicksPerHour}"$)
' Darà 94 ore, quindi arrotondando per difetto.
End Sub