title: How to convert a date to yyyy-mm-dd in typescript
body: <p>I have a node.js application, I used Typescript to build my server, now I need to format dates posted to my server to yyyy-mm-dd format. I could do it in Javascript by using Moment.js but as I used Typescript, I could not figure it out how to convert a date string to yyyy-mm-dd so I can post data to database.</p>