I have date like this: December, 08 2020
and I need to convert it in format similar to this: 2020-02-03T09:00:00
(time part must be there but it can be whatever, time is not relevant)
I have date like this: December, 08 2020
and I need to convert it in format similar to this: 2020-02-03T09:00:00
(time part must be there but it can be whatever, time is not relevant)
Welcome to SO.
you can simply use
console.log(new Date('December, 08 2020 00:00:00 GMT').toISOString())
Appending the string ' 00:00:00 GMT' with help you in getting consistent result across timezones.