The totalHours() method returns the duration converted to hours.
DayPilot.Duration.totalHours();
The duration converted to hours. If the duration includes minutes, seconds or milliseconds the result will be a fractional number.
var hours = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:00").totalHours(); // 108.5