Ask Your Question
0

How can I display the result from a time calculation as hours with two decimals, for example "1.25 hours"

asked 2015-10-06 21:32:36 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm doing a calculation where I deduct one timestamp from another. I want the result in hours with two decimals, for example 16:00-15:30 would be 0.5 hours. What cell format should I use?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-10-06 21:45:51 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Calc stores all timestamps as a decimal value where 1 equals 24 hours. So you could just do the calculation and display it in a cell without setting the format of the cell and get the decimal hours format by multiplying the cell by 24.

Example:

   A                         B                           C
2  12:00                     13:30                       =(B2-A2)*24

You will see 1,5 in cell C2.

edit flag offensive delete link more

Comments

I have calculated hours per day, the sum of these hours is 19:30 in HH:MM format, all of which is fine and correct. Multiplying the 19:30 by 24 gives me 12 in "13" format or 12:00 in HH:MM format but 19.50 in number format, 0.00 which solves [finally] my aim to get total $ for total time spent. Hope this helps

luber1 gravatar imageluber1 ( 2016-11-16 00:14:21 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-10-06 21:32:36 +0200

Seen: 1,237 times

Last updated: Oct 06 '15