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
Try something like this:
moment('12:10:12: PM', 'HH:mm:ss: A').diff(moment().startOf('day'), 'seconds');
returns 43812