title: How to convert character variable to numeric date variable
body: <p>I have below variable</p>
  
  <pre><code>mhstdtc
  -----------    
  2011-01-01
  2015-02-01
  2002
  2001
  2003-03
  2003-12
  </code></pre>
  
  <p>Here is my code I used to convert the variable</p>
  
  <pre><code>ASTDTMC=INPUT(MHSTDTC,is8601da.);
  PUT ASTDTMC DATE9.;
  </code></pre>
  
  <p>It worked only the variable has yyyy-mm-dd values, remaining were returned blank. Please help me to convert yyyy and yyyy-mm values also;</p>
  
  <p>Thanks in advance.</p>