//yyyy-mm-dd to dd-mm-yyyy const changeDateFormet=(date)=>{ const [year, month, day] = date.split('-'); return [day, month, year].join('-'); } const newDate = changeDateFormet('2022-09-24') console.log(newDate)