title: SQL Server datetime filter query
body: <p>I have this query in SQL Server:</p>
  
  <pre><code>SELECT 
      [Order Date], SUM([Profit]) 
  FROM
      [sample].[dbo].[superstore]
  WHERE  
      [Order Date] BETWEEN '2012-06-21 00:00:00.000' AND '2012-09-21 23:59:59.999'
  GROUP BY 
      [Order Date]
  ORDER BY  
      [Order Date];
  </code></pre>
  
  <p>result of this query has record with [Order Date] of <code>2012-06-21 00:00:00.000</code></p>
  
  <p>but with this query</p>
  
  <pre><code>SELECT 
      [Order Date], SUM([Profit]) 
  FROM
      [sample].[dbo].[superstore]
  WHERE  
      [Order Date] BETWEEN '2012-06-21 00:00:00.000' AND '2012-09-21 23:59:59.998'
  GROUP BY 
      [Order Date]
  ORDER BY 
      [Order Date];
  </code></pre>
  
  <p>I don't get this record.</p>
  
  <p>Does SQL Server have any properties that is missing here?</p>
  
  <p>Hint: type of <code>[Order Date]</code> is <code>datetime</code>.</p>