title: How can I select rows that are older than a specific date?
body: <p>I have tried using:</p>
  
  <pre><code>SELECT * FROM dbo.admin_IVM_ITEMMAST WHERE LSTSAL_DATE &lt;= '2016-09-31 00:00:00.000'
  </code></pre>
  
  <p>But when I execute the query i get this error.</p>
  
  <p><strong>Error:</strong> </p>
  
  <blockquote>
    <p>Msg 242, Level 16, State 3, Line 1 The conversion of a char data type
    to a datetime data type resulted in an out-of-range datetime value.</p>
  </blockquote>
  
  <p>The column name is: <code>LSTSAL_DATE</code> and a typical string inside the column is: <code>2013-05-02 00:00:00.000</code></p>