Difference in time between Dates

skashat

New Member
Joined
Apr 22, 2011
Messages
8
Hello,

Thank you in advance to anyone who can offer help...


I have two columns of data; one is a start time and the other is an end time.

The start time will show something like this 23:40, which obviously means 11:40 PM. And an end time may show 23:45.

I can calculate the difference between the two by saying (End Time - Start Time)*60*24 = Total minutes to complete.

However, this formula does not work for jobs that go beyond 24:00.

I may have instances where the start time is 23:40 but the end time is 01:40.

Can I make a formula that would give me 3 hours (180 minutes) for these types of instances?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
That time difference is actually 2 hours. Try like this

Excel Workbook
ABC
123:4001:4002:00
Sheet1
 
Upvote 0
Hello,

Thank you in advance to anyone who can offer help...


I have two columns of data; one is a start time and the other is an end time.

The start time will show something like this 23:40, which obviously means 11:40 PM. And an end time may show 23:45.

I can calculate the difference between the two by saying (End Time - Start Time)*60*24 = Total minutes to complete.

However, this formula does not work for jobs that go beyond 24:00.

I may have instances where the start time is 23:40 but the end time is 01:40.

Can I make a formula that would give me 3 hours (180 minutes) for these types of instances?
As long as the difference will not be greater than or equal to 1 day...

A1 = start time = 7:00 PM
B1 = end time = 3:00 AM

=MOD(B1-A1,1)*24

Format as General or Number

If the time may span multiple days then you'd have to include the dates with the calculation and then it would be simple subtraction.
 
Upvote 0
Yes!

Thank you both for the extremely quick responses.

@ T. Valko, yes you're right I do have to make the assumption that it never goes beyond a day (I am given only a start date).

@VoG, good catch on the number of hours ;)

Thank you both again, you have made my life (at least somewhat...) easier -_-
 
Upvote 0
Yes!

Thank you both for the extremely quick responses.

@ T. Valko, yes you're right I do have to make the assumption that it never goes beyond a day (I am given only a start date).

@VoG, good catch on the number of hours ;)

Thank you both again, you have made my life (at least somewhat...) easier -_-
You're welcome. Thanks for the feedback! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,543
Members
452,924
Latest member
JackiG

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