title: Stata: how to change a string variable to a date?
body: <p>I'm new to Stata, and I'm wondering how can I change a string variable which contains a date to a date format.</p>
  
  <p>The data in the variable looks like this:</p>
  
  <p>yyyy-mm-dd</p>
  
  <p>Should I first remove the dashes so that Stata can recognize the format in order to later use <code>gen var = date()</code> ?</p>
  
  <p>Thank you for your help.</p>