Comparing 12-hour time data

aduval

New Member
Joined
Jul 18, 2003
Messages
17
I want to calculate the amount of time that has passed between the start time and the end time. The data comes from an external database so I have to analyze it in Excel. Here is a sample of the data:

BEGIN_TIME END_TIME
91945 93105
93109 94139
94143 95327
95331 101015
101020 101514
101520 101951
101954 103522
103526 104744
71125 71529
71604 71736

It is in (hhmmss) format but some times are 5 digit numbers and some are 6 digit numbers.

I need a formula that I can put in a third column that will calculate the hhmmss that has passed between the two time values.

Can you help?

Andre
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
If A1 contains 91945 this formula:

=TEXT(A1,"00\:00\:00")+0

will return a true serial time.

To subtract the times you can use:

=TEXT(B1,"00\:00\:00")-TEXT(A1,"00\:00\:00")

formatted as [h]:mm:ss.
 

Forum statistics

Threads
1,185,991
Messages
5,955,189
Members
438,186
Latest member
subvtech

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
Top