Moment js convert milliseconds into date and time

前端 未结 2 1340
天涯浪人
天涯浪人 2021-02-01 12:49

I have current time in milliseconds as - 1454521239279

How do I convert it to 03 FEB 2016 and time as 11:10 PM ?

2条回答
  •  抹茶落季
    2021-02-01 13:10

    If you have 1o digit 1591074937 then you can convert like this.

    moment(1591074937*1000).format("DD MMM YYYY")
    
    OR
    
    new Date(1591074937 * 1000)
    

提交回复
热议问题