I have the following date and unsure how to convert it to DD/MM/YYYY HH24:MI:SS, i.e.:
"2021-04-23T05:36:59.486Z"
From what I can see, the time that was suppled was 15:36:59
which doesn't seem to match T05:36:59.486Z
I have the following date and unsure how to convert it to DD/MM/YYYY HH24:MI:SS, i.e.:
"2021-04-23T05:36:59.486Z"
From what I can see, the time that was suppled was 15:36:59
which doesn't seem to match T05:36:59.486Z
The above string shows the date in ISO Format and the timezone is "+00:00". Your local timezone may be different. Refer 55246983
toLocaleString
methodconst
d = new Date().toLocaleString(),
date = d.split(",")[0],
time = d.split(",")[1].trim();
console.log(date);
console.log(time);