I am getting 2022-02-08T09:34:35.000Z this response from an API.
I am trying to convert it into a simple format like- 08-02-2022 09:34:35
I am getting 2022-02-08T09:34:35.000Z this response from an API.
I am trying to convert it into a simple format like- 08-02-2022 09:34:35
You can use the Date.prototype.toLocaleString()
let date = new Date();
date = date.toLocaleString()