Answers for "moment js dif"

1

vue moment js difference between dates in minutes

var now  = "04/09/2013 15:00:00";
var then = "04/09/2013 14:20:30";

moment.utc(moment(now,"DD/MM/YYYY HH:mm:ss").diff(moment(then,"DD/MM/YYYY HH:mm:ss"))).format("HH:mm:ss")

// outputs: "00:39:30"
Posted by: Guest on June-23-2020
2

moment format heure

var time = "15:30:00";
var formatted = moment(time, "HH:mm:ss").format("LT");
console.log(formatted); 
//it will return 3:30 PM
Posted by: Guest on May-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language