Reputation: 69
How do I phrase this date 2018-11-04T14:00:00-07:00? I got this from the NWS API. I have tried using Date() and other functions.
2018-11-04T14:00:00-07:00
Upvotes: 0
Views: 21
Reputation: 1421
Check out the docs on Date(). Not sure what format you're after but try the methods, specifically toDateString()
toDateString()
var date = new Date('2018-11-04T14:00:00-07:00'); console.log(date.toDateString());
Upvotes: 1