Hannoun Yassir Hannoun Yassir - 4 years ago 154
Javascript Question

Convert seconds to HH-MM-SS with JavaScript?

How can I convert seconds to an

string using JavaScript?

Answer Source

Don't you know datejs? it is a must know.

Using datejs, just write something like:

(new Date).clearTime()


Nowadays date.js is outdated and not maintained, so use "Moment.js", which is much better as pointed out by T.J. Crowder.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download