You haven't said what cells any of your data is in, or what format your date / time values take.
This suggested formula is based on the following:
1. Start date is in cell A2 and the date is recognized by Excel as a date (for example it will accept different date formats, and if formatted as a number will show a value around 40000 if it is a recent date)
2. Start hour is in cell B2 and it is an integer in the range 0 to 24
3. Start minute is in cell B3 and it is an integer in the range 0 to 59
4. The Ending date/time values are in cells D2, E2 & F2
As you want only a difference in hours, rounding has been applied, based on 30 minutes or greater rounding up to the next hour.
Enter this formula in any empty cell:
=IF(MINUTE((D2+TIMEVALUE(E2&":"&F2))-(A2+TIMEVALUE(B2&":"&C2)))>29, (D2+TIMEVALUE(E2&":"&F2))-(A2+TIMEVALUE (B2&":"&C2))+1/24, (D2+TIMEVALUE(E2&":"&F2))-(A2+TIMEVALUE(B2&":"&C2)))
Format the output cell:
Apply this Custom number format [h]
The square brackets are required. Excel will now convert days of difference to hours of difference and add it to the time difference.
If the assumptions given above are wrong, please provide the appropriate details.
If the formula does not return the expected number of hours, please post all 6 input values and the result of the formula.