In my MongoDB database, I have a date value like "2017-12-14T4:0:14-06:00"
and I'm trying to format it in this way:
moment(new Date("2017-12-14T4:0:14-06:00")).format('MMM DD,YYYY A')
However, when I try the code above, it returns Invalid date.
new Date("2017-12-14T4:0:14-06:00");
Any suggestions on how to make this work?