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!

[TABLE="width: 500"]
<tbody>[TR]
[TD]TIME 1[/TD]
[TD]Time 2[/TD]
[TD]Desired Result[/TD]
[/TR]
[TR]
[TD]3/4/2019 10:47 AM[/TD]
[TD]3/4/2019 10:45 AM[/TD]
[TD]-2 Minutes[/TD]
[/TR]
[TR]
[TD]3/5/2019 11:55 AM[/TD]
[TD]3/5/2019 12:55 PM[/TD]
[TD]60 minutes or 1 hour[/TD]
[/TR]
[TR]
[TD]3/6/2019 11:45 PM[/TD]
[TD]3/7/2019 12:01 AM[/TD]
[TD]16 minutes[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
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,224,820
Messages
6,181,159
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