I have a string with 12 hour formatted time only
12
var time=\"12:10:12: PM\"
I want to convert this string to seconds.
how can
For mm:ss to seconds
myVar = moment.duration(`00:${'02:00'}`).asSeconds()//mm:ss to seconds