I am new to Momentjs. I am trying to use it to convert milliseconds to hours and minutes. Below, x is milliseconds
x = 433276000
var y = moment.duration(x, \
Momentjs itself doesn't support duration, in order to do so, we need a plugin moment-duration-format
To use this plugin follow these steps (for React-js)
import moment from 'moment';
import momentDurationFormatSetup from "moment-duration-format";
var time = moment.duration(value,unit).format('hh:mm:ss',{trim:false})
Note: I have used {trim: false} as extra parameter so that it doesn't trim out extra 0's in the beginning. You can omit it if you want "11:30" instead of "00:11:30".