We first define a helper function, that we then map onto your list.
First thing to do is to extract the different numbers. This may be done using StringCases. This gives strings that we need to convert into numbers using ToExpression. E.g.:
ToExpression[StringCases["00:02:43.020", DigitCharacter ..]]
Now we have a list of the different numerical parts. To change this to seconds we need to multiply by a suitable factors and sum up. This is easily don using Dot (.). E.g.:
ToExpression[StringCases["00:02:43.020", DigitCharacter ..]]. {60 60, 60, 1,
1/1000.}
To create a function we may use: Function[{args}, body] or for short: (body with argument: #)&. Therefore, our helper function may be defined by:
fun= ToExpression[ StringCases[#, DigitCharacter ..]] . {60 60, 60, 1, 1/1000.}&
Mapping (either using Map or shorter: fun /@ data) this onto the test data:
sumoftime = {"00:02:43.020", "00:02:45.620", "00:01:35.820",
"00:01:45.620", "00:01:59.220"}
fun /@ sumoftime
(* {163.02, 163.02, 163.02, 163.02, 163.02} *)
{3600, 60, 1} . ToExpression@StringSplit[#, ":"] & /@ sumoftime– Bob Hanlon Apr 04 '22 at 18:25