Date Time Group Hour/Minute Differences

catsey2

New Member
Joined
Oct 17, 2003
Messages
3
:oops: I'm trying to find a solution to the following problem:

I receive many, many ship position latitude and longitude data points that are referenced by the date and time those position data points were received. The date time group for each data point is displayed as, for example, 20050102080000, where 2005 is the year, 01 the month, 02 the day, 08 the hours, 00 the minutes, and 00 the seconds. I need to compare the initial position date/time with the next one following it and determine the hours, minutes, and seconds of difference between them, but of course the formula also has to take into account the fact that one date time group might also occur at the end of one month (or year) and the next occur at the beginning of the next month (or year).

Can anyone help me?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

leibale

Active Member
Joined
Sep 12, 2002
Messages
336
=DATE(LEFT(A2,4),MID(A2,5,2),MID(A2,7,2))+TIME(MID(A2,9,2),MID(A2,11,2),MID(A2,13,2))-(DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))+TIME(MID(A1,9,2),MID(A1,11,2),MID(A1,13,2)))
where A1 is the first date and A2 is the second
format the result as [hh]:mm:ss
 

Forum statistics

Threads
1,148,053
Messages
5,744,528
Members
423,881
Latest member
Nguyen Vu

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