I have data available in ISO format which is 2021-06-01T00:00:00.000Z
. I want to convert it into 1st June 2021
format.
Below is what I did
const dat = 2021-06-06T00:00:00.000Z;
const d = new Date(dat);
console.log(d.toDateString());result
I am getting this Tue Jun 01 2021
. How can I format this into desired format?