Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to convert seconds in hours minutes and seconds js

function convertSeconds(seconds) {
  var convert = function(x) { return (x < 10) ? "0"+x : x; }
  return convert(parseInt(seconds / (60*60))) + ":" +
         convert(parseInt(seconds / 60 % 60)) + ":" +
         convert(seconds % 60)
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #seconds #hours #minutes #seconds #js
ADD COMMENT
Topic
Name
1+1 =