I want to convert a duration of time, i.e., number of seconds to colon-separated time string (hh:mm:ss)
I found some useful answers here but they all talk about conv
To get the time part in the format hh:MM:ss, you can use this regular expression:
hh:MM:ss
(This was mentioned above in same post by someone, thanks for that.)
var myDate = new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"); console.log(myDate)