Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

formating decimal hours as hours and minute javascript

var decimalTimeString = "1.6578";
var n = new Date(0,0);
n.setMinutes(+decimalTimeString * 60);
var result = n.toTimeString().slice(0, 5);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #formating #decimal #hours #hours #minute #javascript
ADD COMMENT
Topic
Name
8+6 =