I have a spreadsheet with values as follows:
1:29.460
I need to convert it to
89.460
I have a huge amount of these play offsets. I can either do it in excel or perhaps using javascript.
Any advice on a formula appreciated!
Multiply the number of minutes by 60. For example, if you are converting 11 minutes, multiply it by 60 to get 660 seconds. Or, if you are converting 20 minutes, try 20 x 60 = 1,200 seconds.
To convert an hour measurement to a second measurement, multiply the time by the conversion ratio. The time in seconds is equal to the hours multiplied by 3,600.
How to Convert Seconds to Minutes. The time in minutes is equal to the time in seconds divided by 60. Since there are 60 seconds in one minute, that's the conversion ratio used in the formula.
Here’s a JavaScript solution:
function convert(input) {
var parts = input.split(':'),
minutes = +parts[0],
seconds = +parts[1];
return (minutes * 60 + seconds).toFixed(3);
}
convert('1:29.460'); // '89.460'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With