I have date got from a API like this 2018-08-27T09:28:53, now I want to convert it to a format like August 27, 2018.
I have tried using this
var d = new Date(val.date);
d = d.toDateString();
the above code gives a date like Mon Jul 27 2018. How can I add the comma and separate the month day and year?
Is there a better way to format iso 8601 date to desired format, for me like August 27, 2018.