title: sql date time validation
body: <p>I have a column with datatype <code>nvarchar</code> and the column contains data i.e </p>
  
  <pre><code>2017-12,
  2017-28,
  2017-00,
  0000,
  0000-22
  </code></pre>
  
  <p>etc'.</p>
  
  <p>So in the column I have invalid data i.e <code>2017-00</code>,<code>0000</code>,<code>0000-22</code>, so I want the column output should be valid data i.e <code>2017-12</code>,<code>2017-28</code> etc'. 
  And use that column in join condition and case statements.</p>