Skip to main content
added 185 characters in body
Source Link
Glorfindel
  • 4.1k
  • 8
  • 25
  • 37

If you're certain the timestamps always come in that format (HH:mm:ss.SSS), you can use the following Excel function (provided that the timestamp is in cell A1, and it's formatted like text):

=VALUE(RIGHT(A1, 6))+60*VALUE(MID(A1, 4, 2))+3600*(LEFT(A1, 2))

For a timestamp of 00:02:02.300, this will give the result 122.3.

If it is formatted as a date, it's even simpler:

=A1*86400

(because Excel stores times as fractions of a day; e.g. 12:00:00 is stored as 0.5 because it's half of 24 hours)

If you're certain the timestamps always come in that format (HH:mm:ss.SSS), you can use the following Excel function (provided that the timestamp is in cell A1, and it's formatted like text):

=VALUE(RIGHT(A1, 6))+60*VALUE(MID(A1, 4, 2))+3600*(LEFT(A1, 2))

For a timestamp of 00:02:02.300, this will give the result 122.3.

If you're certain the timestamps always come in that format (HH:mm:ss.SSS), you can use the following Excel function (provided that the timestamp is in cell A1, and it's formatted like text):

=VALUE(RIGHT(A1, 6))+60*VALUE(MID(A1, 4, 2))+3600*(LEFT(A1, 2))

For a timestamp of 00:02:02.300, this will give the result 122.3.

If it is formatted as a date, it's even simpler:

=A1*86400

(because Excel stores times as fractions of a day; e.g. 12:00:00 is stored as 0.5 because it's half of 24 hours)

Source Link
Glorfindel
  • 4.1k
  • 8
  • 25
  • 37

If you're certain the timestamps always come in that format (HH:mm:ss.SSS), you can use the following Excel function (provided that the timestamp is in cell A1, and it's formatted like text):

=VALUE(RIGHT(A1, 6))+60*VALUE(MID(A1, 4, 2))+3600*(LEFT(A1, 2))

For a timestamp of 00:02:02.300, this will give the result 122.3.