title: Why does DiffDay return 0 results
body: <p>I'm totally stuck. I'm trying to query results if a company ID occurs over 2 days. </p>
  
  <p>I mocked up using an object to mock what the database would be and all worked - I'm now using a database </p>
  
  <p>My database is</p>
  
  <pre><code>Id         DateTime                          CompanyId
  1          2015-02-03 10:30:01:000              5  
  2          2015-02-03 10:29:01:000              5
  3          2015-02-03 10:27:01:000              5
  4          2015-02-03 09:26:01:000              5
  5          2015-01-01 10:30:01:000              5
  </code></pre>
  
  <p>Please note, the last entry is the different date! </p>
  
  <p>The below linq is getting the number of days between the max and min values, and if there are differences of more than 1 day, then show the result. <code>_visitDetail</code> (below) is the Entity table object. </p>
  
  <pre><code>var ids = from o in _visitDetail
            group o by o.CompanyId into grouped
            where (EntityFunctions.DiffDays(grouped.Max(s =&gt; s.DateTime), grouped.Min(s =&gt; s.DateTime))) &gt; 0
            select grouped;
  </code></pre>
  
  <p>The problem is I always get 0 results where I would expect to get an item. I can't see why or what I've done wrong... </p>