title: TSQL: Date BETWEEN Query - Ignoring Time
body: <p>I am trying to do a query between 2 dates. I would like to do it without having to worry about the time. When a user enters the 2 dates they want to search on, there is no selection for time. This means that the dates that they enter default to 12:00 AM.</p>
  
  <p>The dates in the table do have times though. I just would like to ignore the times all together so the search brings back any records form said date range.</p>
  
  <p>Here is my SQL:</p>
  
  <pre><code>TheDate BETWEEN @EnteredBeginDate AND @EnteredEndDate
  </code></pre>
  
  <p>So when a user does a range search between 8/6/2009 AND 9/9/2009 I want to return the records:</p>
  
  <pre><code>8/6/2009 11:33:02 AM
  8/6/2009 11:39:17 AM
  9/9/2009 8:21:30 AM
  </code></pre>
  
  <p>What's happening now is I only get back:</p>
  
  <pre><code>8/6/2009 11:33:02 AM
  8/6/2009 11:39:17 AM
  </code></pre>
  
  <p>Can someone please recommend the best way to do this in SQL? I know how to do it in C#.</p>