Moment js convert milliseconds into date and time

Solution 1:

Moment parser

moment(1454521239279).format("DD MMM YYYY hh:mm a") //parse integer
moment("1454521239279", "x").format("DD MMM YYYY hh:mm a") //parse string

Moment unix method

moment.unix(1454521239279/1000).format("DD MMM YYYY hh:mm a")

Solution 2:

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

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

OR

new Date(1591074937 * 1000)