ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   calculating time (https://www.excelbanter.com/excel-worksheet-functions/156746-calculating-time.html)

Emerogork via OfficeKB.com

calculating time
 
7:00am int A1, 3:00pm in B1. When I (B1 - A1) I get 0.33 but I want 8.
Thoughts?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200709/1


JE McGimpsey

calculating time
 
XL stores times as fractional days, so multiply by 24 hours per day to
get hours:

=(B1-A1) * 24

In article <779ad662a28a3@uwe,
"Emerogork via OfficeKB.com" <u36894@uwe wrote:

7:00am int A1, 3:00pm in B1. When I (B1 - A1) I get 0.33 but I want 8.
Thoughts?


Stan Brown

calculating time
 
Sun, 02 Sep 2007 07:30:51 GMT from Emerogork via OfficeKB.com <u36894
@uwe:
7:00am int A1, 3:00pm in B1. When I (B1 - A1) I get 0.33 but I want 8.
Thoughts?


The subtraction gives you fractions of a day. Multiply by 24 to get
hours and fractions of an hour.

If you want only whole hours, use INT() or ROUND() on the result.

--
"First prove what you're saying, then whine about it."
-- /The People's Court/
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com