Convert seconds to HH-MM-SS with JavaScript?

前端 未结 30 2411
南旧
南旧 2020-11-22 10:05

How can I convert seconds to an HH-MM-SS string using JavaScript?

30条回答
  •  轮回少年
    2020-11-22 10:27

    You can also use below code:

    int ss = nDur%60;
    nDur   = nDur/60;
    int mm = nDur%60;
    int hh = nDur/60;
    

提交回复
热议问题