I need to change the format of a date I get,
Ex:
2020-12-31T00:00:00
Into
Dec-31-2020
I need to change the format of a date I get,
Ex:
2020-12-31T00:00:00
Into
Dec-31-2020
let date = new Date()
let day = date.getDate()
let month = date.getMonth() + 1
let year = date.getFullYear()
if(month < 10){
console.log(`${day}/0${month}/${year}`)
}else{
console.log(`${day}/${month}/${year}`)
}