title: C# Linq compare only date from a datetime property
body: <p>I have the following Linq to Entity:</p>
  
  <pre><code>var details = Uow.EmployeeAttendances.GetAllReadOnly()
      .Where(a =&gt; a.EmployeeId == summary.EmployeeId &amp;&amp; a.Timestamp == summary.Date)
      .ToList();
  </code></pre>
  
  <p><code>summary.Date</code> is just the date part so the value is like this: '2014-07-20 00:00:00'</p>
  
  <p>The problem is that <code>a.TimeStamp</code> is a DateTime field with both date and time.</p>
  
  <blockquote>
    <p>So the above query always return empty</p>
  </blockquote>
  
  <p>Any way I can convert <code>a.TimeStamp</code> just to Date so I can compare apples with apples?</p>
  
  <p>The error that I get is:</p>
  
  <pre><code>The specified type member 'Date' is not supported in LINQ to Entities
  </code></pre>
  
  <p>Appreciate it.</p>