var todayDate = new Date().toISOString()
console.log(todayDate);
const str = '22/04/2022';
const [day, month, year] = str.split('/');
console.log(day); // 22
console.log(month); // 04
console.log(year); // 2022
const date = new Date(+year, month - 1, +day);
console.log(date); // Fri Apr 22 2022
var dateStr = 'dd/mm/yyyy';
var date = dateStr.split("/");
var dd=date[0];
var mm=date[1];
var yyyy=date[2];
dateObj = new Date(yyyy,mm,dd);
DateParts = data.split("/");
new Date(+DateParts[2], DateParts[1] - 1, +DateParts[0]).setUTCHours(
0,
0,
0,
0
)
var yourdate = date.split("/").reverse().join("-");
let d = '06/22/2022'.split('/')
d = d[2].concat(d[0], d[1])
console.log(typeof d, d)
// string 20220622