title: Convert varchar into datetime in SQL Server
body: <p>How do I convert a string of format <code>mmddyyyy</code> into <code>datetime</code> in SQL Server 2008?</p>
  
  <p>My target column is in <code>DateTime</code></p>
  
  <p>I have tried with <code>Convert</code> and most of the <code>Date</code> style values however I get an error message:</p>
  
  <blockquote>
    <p>'The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.' </p>
  </blockquote>