title: How to compare with only dates and ignore time in where clause in SQL Server 2008
body: <p>I have a column <code>Expiry_Date</code> with date and time values in <code>table1</code>.</p>
  
  <p>I am sending a date value from the front end using C#.</p>
  
  <p>I write the query to get some information if where condition is true.</p>
  
  <p>For ex: in <code>table1</code>, <code>Expiry_Date</code> has the value <code>2016-03-11 23:59:59.000</code></p>
  
  <pre><code>select USER_NAME, USER_EMAIL 
  from table1 
  where Expiry_Date = '2016-03-12';
  </code></pre>
  
  <p>When I execute this, I am not getting any results. Actually the table has the data for this date, due to not having time part in supplied date, it's not matching with <code>Expiry_Date</code>.</p>
  
  <p>So please let me know how can we do this without passing time from front end.</p>