Subtracting Time and Date in hours & minutes

gvillepa

New Member
Joined
Oct 18, 2017
Messages
36
Hi, I have 2 columns. Each column contains a date & time in "m/d/yyyy h:mm AM/PM" format.

I am trying to subtract the differences between two columns and am having a hard time. Any assistance appreciated and the desired result format is negotiable, so long as i get minutes difference....3 hours could be 180 minutes, etc. Thanks!

TIME 1Time 2Desired Result
3/4/2019 10:47 AM3/4/2019 10:45 AM-2 Minutes
3/5/2019 11:55 AM3/5/2019 12:55 PM60 minutes or 1 hour
3/6/2019 11:45 PM3/7/2019 12:01 AM16 minutes

<tbody>
</tbody>
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You can use this formula...

=MAX(A1,B1)-MIN(A1,B1)

to return the time differential. Since this return value will be a real time serial value, you can format the cell using any time format pattern that you like.
 
Upvote 0
Thank you. I just put this together:

=SUM((E3-F3)*86400)/60

which works, but not as well as what you just offered. Thank you kind sir.
 
Upvote 0
Clever Rick.

gvillepa, you could try something like the below.

IF(B2 < A2,(MAX(A2,B2) - MIN(A2,B2)) * - 1440,(MAX(A2,B2) - MIN(A2,B2)) * 1440)<a2,(max(a2,b2)-min(a2,b2))*-1440,(max(a2,b2)-min(a2,b2))*1440)<a2,(max(a2,b2)-min(a2,b2))*-1440,(max(a2,b2)-min(a2,b2))*1440)[ code]
<a2,(max(a2,b2)-min(a2,b2))*-1440,(max(a2,b2)-min(a2,b2))*1440)[ code]<="" html=""></a2,(max(a2,b2)-min(a2,b2))*-1440,(max(a2,b2)-min(a2,b2))*1440)[></a2,(max(a2,b2)-min(a2,b2))*-1440,(max(a2,b2)-min(a2,b2))*1440)<a2,(max(a2,b2)-min(a2,b2))*-1440,(max(a2,b2)-min(a2,b2))*1440)[>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,621
Messages
6,120,568
Members
448,972
Latest member
Shantanu2024

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