convert iso string to datetime javascript

Solutions on MaxInterview for convert iso string to datetime javascript by the best coders in the world

showing results for - "convert iso string to datetime javascript"
Alina
25 Jun 2020
1date = new Date('2021-09-16T10:20:00.000Z');
2year = date.getFullYear();
3month = date.getMonth()+1;
4dt = date.getDate();
5
6if (dt < 10) {
7  dt = '0' + dt;
8}
9if (month < 10) {
10  month = '0' + month;
11}
12
13console.log(year+'-' + month + '-'+dt);
similar questions
queries leading to this page
convert iso string to datetime javascript