Thread: subtract times
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default subtract times

"mp" wrote:
How to get time difference in hours and fractions of hours?

[....]
Col A Col B Col C
Start Time End Time Elapsed
2:50 PM 3:10 PM = B-A


=(B2-A2)*24

formatted as Number with some number of decimal places.

Time and dates are stored as days and fraction of days.


----- original message -----

"mp" wrote in message
...

How to get time difference in hours and fractions of hours?

example 3 columns in a spread sheet
Col A and B formated as "Time"
Col C formatted as Custom "h:mm" produces result 0:20 in example below
how to format so as to produce result 0.3333?
I tried formatting as "h" but it then produces 0
formatting as 0.00 produces 0.01 - no clue how it comes up with that one?

Col A Col B Col C
Start Time End Time Elapsed
2:50 PM 3:10 PM = B-A

thanks
mark