But if you say it says 5:00PM, then I would expect it to convert to 17, not
5.
If your original inputs were 10:00 am and 3:00 pm, then if you have the
result cell formatted as h:mm AM/PM, the formula =D1-C1 ought to display as
5:00 AM (not PM), but to get it to show 5:00, you can change the format to
[h]:mm. To convert to decimal hours, use Peo's formula.

Signature
David Biddulph
> if you want it to be 5 decimal format you need to multiply the result with
> 24 and format the cell as general or number (not time), if you want 05:00
[quoted text clipped - 8 lines]
>> as
>> hh mm ampm
>>> =D1-C1
>>> > Hello!
>>> > I want to calculate # of hours worked in this example:
>>> >
>>> > C1 10:00 am
>>> > D1 3:00 pm
>>> > I want to display the duration of 5 hours.
Peo Sjoblom - 25 Sep 2007 17:57 GMT
Thanks for the heads up

Signature
Regards,
Peo Sjoblom
> But if you say it says 5:00PM, then I would expect it to convert to 17,
> not 5.
[quoted text clipped - 23 lines]
>>>> > D1 3:00 pm
>>>> > I want to display the duration of 5 hours.