title: How to convert a date from one type to another typescript
body: <p>React with Typescript:</p>
  <p>I have a date picker(mui v5) that requires date value to be in format &quot;yyyy-MM-dd&quot;.
  However the api return a type Date on the format &quot;2022-01-12T00:00:00.000+00:00&quot;</p>
  <p>Attention: There are <strong>many answers</strong> to create a string in that format but I need a <strong>Date</strong> without this it won't work with typescrit</p>