Error calculating the hours and minutes between 2 times

exflyer1996

Board Regular
Joined
May 25, 2009
Messages
123
The Start Time and End Time are exporting from our database in the following formats:

6:52:00 AM and 3:32:00 PM (although this displays in Military Time).

What I want to do is sum the time between the 2 in an hours and 10th of an hour format, so that a SUMIF formula will pull in the hours. Ideally, I like to be able to format the SQL file so that it calculates the time when I execute the query.

Many Thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I don't know SQL, but if your earlier time is in cell A1 and your later time is in cell B1, the following formula will give you the hours rounded to the nearest tenth of an hour...

=ROUND(24*(B1-A1),1)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top