Hours: Integer;
The Hours property returns the number of full hours in the time interval.
Sub Main;
Var
t: TimeSpan;
Begin
t := TimeSpan.Compose(1, 10, 15, 33, 7);
Debug.WriteLine(t.Hours);
Debug.WriteLine(t.TotalHours);
End Sub Main;
After executing the example a new time interval is obtained. The development environment console displays the number of full hours in the time interval and the interval length in hours.
10
34,2591686111111
See also: