ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Working With Times / Milliseconds (https://www.excelbanter.com/excel-worksheet-functions/121743-working-times-milliseconds.html)

Carl

Working With Times / Milliseconds
 
My times come in like this:

TimeA TimeB
120509324389.00 120509324395.00
120510001924.00 120510001927.00

The first 4 characters are month and day (which I do not need). The last 2
characters are milliseconds. I am trying to convert these times into the
table below and I also need a formula to subtract the 2 times.

TimeA TimeB Difference
9:32:43.89 9:32:43.95
10:00:19.24 10:00:19.27

Thank you in advance.


T. Valko

Working With Times / Milliseconds
 
TimeA TimeB
120509324389.00 120509324395.00
120510001924.00 120510001927.00


Assume those entries are in A2:B3

You could use those entries as is like this:

For B2-A2:

=TIME(MID(B2,5,2),MID(B2,7,2),MID(B2,9,2))+MID(B2, 11,2)/86400/100-(TIME(MID(A2,5,2),MID(A2,7,2),MID(A2,9,2))+MID(A2, 11,2)/86400/100)

Format as h:mm:ss.00

However, if you want to convert them to times in separate cells then find
the difference:

D2 formula:

=TIME(MID(A2,5,2),MID(A2,7,2),MID(A2,9,2))+MID(A2, 11,2)/86400/100

Copy across to E2

F2 formula:

=E2-D2

Format all cells as h:mm:ss.00

Then select cells D2:F2 and copy down as needed.

Biff

"carl" wrote in message
...
My times come in like this:

TimeA TimeB
120509324389.00 120509324395.00
120510001924.00 120510001927.00

The first 4 characters are month and day (which I do not need). The last 2
characters are milliseconds. I am trying to convert these times into the
table below and I also need a formula to subtract the 2 times.

TimeA TimeB Difference
9:32:43.89 9:32:43.95
10:00:19.24 10:00:19.27

Thank you in advance.





All times are GMT +1. The time now is 11:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com