Convert string to date

OK, i am possibly being a bit lazy here but I am sure someone out there has a quick and easy way of doing this.

I have an API which returns dates as a string in the format like ‘18 Sep 2020’ which i want to convert into a date within a server action to insert into a database. What is the best way to do that?

I am using node

Community Page
Last updated: