We will be migrating from Ask to Discourse on the first week of August, read the details here

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

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 reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2020-08-26 13:15:44.691880

Sort by » oldest newest most voted

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.

more