title: how to convert string of date format 'dd/MM/yyyy' to type date only using typescript
body: <p>I have tried below code to get the date from 'yyyy-mm-dd' format to 'dd/MM/yyyy'.
  But when i check the typeof() the result, it is of type string.
  Is there some way to convert it to only date.</p>
  
  <pre><code>let result;
  const timestamp = Date.parse(myStringDate)
  if (isNaN(timestamp) === false) {
    const newdate = new Date(myStringDate);
   result = `${newdate.getDate()}/${newdate.getMonth()+1}/${newdate.getFullYear()}`
    return result;
  } else {
    return myStringDate;
  }
  </code></pre>