title: Incorrect date comparison results in SQL Server 2008 R2
body: <p>I have a LINQ 2 SQL query that's getting me a list of results for the month of February 2012. The resulting where clause is </p>
  
  <pre><code>DECLARE @p0 DateTime = '2012-02-01 00:00:00.000'
  DECLARE @p1 DateTime = '2012-02-29 23:59:59.999'
  ....
  WHERE (CONVERT(DATE, [t0].[DatePlaced]) &gt;= @p0) AND (CONVERT(DATE, [t0].[DatePlaced]) &lt;= @p1)
  </code></pre>
  
  <p>When this runs I'm getting results for 3/1/2012 showing up as well as all the results for 2/2012.</p>
  
  <p>If I change the where clause to use <code>BETWEEN</code> then the results only contain dates for February.</p>
  
  <pre><code>WHERE [t0].[DatePlaced] BETWEEN @p0 AND @p1
  </code></pre>
  
  <p>I'm using .net 4 and SQL Server 2008 R2 with and without SP1.</p>
  
  <p>Switching the dates to 3/1/2011 and my query's end date to <code>'2011-02-28 23:59:59.999'</code> yielded the same results.</p>
  
  <p>Is there another way to get the results for just 2/2012 aside from using BETWEEN which LINQ 2 SQL doesn't support?</p>