skip to Main Content

Javascript – Date Milliseconds same for two dates

I have a date string of format 'dd-mm-yyyy' which I want to convert to Milliseconds. let split_date = '31-01-2024'.split('-'); let d = new Date(parseInt(split_date[2]), parseInt(split_date[1]), parseInt(split_date[0]), 0, 0, 0, 0).getTime(); console.log(d); let split_date2 = '02-02-2024'.split('-'); let d2 = new Date(parseInt(split_date2[2]),…

VIEW QUESTION
Back To Top
Search