var dateWithTime = new Date().toLocaleString().replace(",", "") console.log(dateWithTime) //output :6/24/2022 9:36:33 PM