How to get a hh:mm:ss in moment

时间:2019-01-09 22:14:51

标签: momentjs angular-moment moment-timezone angular-momentum

i have selected date: SelectedDate = {1/2/2019 12:00:00 AM}, startDatte :1/2/2019 12:00:00 AM, endDate: "01/02/2019 04:00";

i have subtract endDate.Subtract(startDate) and store in variable as final o.p

04:00:00.

How to do this in moment: i have tried this but providing wrong value.

 moment.duration(moment(endDate).diff(moment(startDate))

0 个答案:

没有答案