I have a lot of elapsed time records in the form of mm.ss.00.
For example if elpased time was
1min 44.72sec, data becomes
I want to convert these data into pure seconds data.
Let me give some examples.
|mm.ss.00 |seconds |
I can assure that time record never exceed 59min 59.99sec, so you can easily assume 1 or 2 digits before first dot(
.) must be minutes.
Best How To :
This treats the likes of
1.44.72 as a string and manipulates it to strip off the numeric characters up to and including the first full stop (period in USA). The part including and after the plus sign may not be required if the minutes are to be ignored as it takes the number before the first full stop (minutes) converts to seconds and adds that to the seconds and hundredths of seconds from the first part of the formula.
The addition process converts the text result from string manipulation into a numeric format, though this could be achieved for seconds and hundredths of seconds in other ways.