I have a date returned as a timestamp from the the server response and I want to convert it to ("MMM DD, HH:mm")
format using the toUTCString()
. so far I have this:
date = new Date(1555649122787).toUTCString()
o/p:
"Mon, 22 Apr 2019 23:00:32 GMT"
, however I want the o/p in this format:
Apr 22, 23:00
. Unfortunately for my project I'm unable to use moment.js as a library. any other better ways?