# Date Time Group Hour/Minute Differences

#### catsey2

##### New Member
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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
=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

Replies
4
Views
448
Replies
6
Views
490
Replies
7
Views
565
Replies
1
Views
371
Replies
3
Views
213

1,219,892
Messages
6,150,814
Members
450,985
Latest member
Andynair7

### 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.

### Which adblocker are you using?

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

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