title: SQL Server query where DATETIME
body: <p>I got this query:</p>
  
  <pre><code>select IDS as data 
  from dbo.SKz 
  where dbo.SKz.DatSave &gt;= 2008-12-20
  </code></pre>
  
  <p>and it works OK. But when I want query by hours and minutes: </p>
  
  <pre><code>select IDS as data 
  from dbo.SKz 
  where dbo.SKz.DatSave &gt;= 2008-12-20 23:59:59
  </code></pre>
  
  <p>I get an error:</p>
  
  <blockquote>
    <p>Msg 102, Level 15, State 1, Line 1<br>
    Incorrect syntax near '23'.</p>
  </blockquote>
  
  <p><code>DatSave</code> is a <code>datetime</code> column. Example from row = <code>2008-12-26 13:44:37.000</code></p>
  
  <p>Where is the problem? Thank you. </p>