Well, if you already know that this is not null, you can use Value to get a base value other than zero:
q = q.AsQueryable() .Where(c => c.CallNextDate.Value.Date < DateTime.Now.Date) .ToList();
Or, if you want to filter this as well:
q = q.AsQueryable() .Where(c => c.CallNextDate.Value != null && c.CallNextDate.Value.Date < DateTime.Now.Date) .ToList();
I would highly recommend that you get the date once today and reuse it for the entire request:
var today = DateTime.Today; q = q.AsQueryable() .Where(c => c.CallNextDate.Value != null && c.CallNextDate.Value.Date < today) .ToList();
This will give you more consistency. You should really consider whether, of course, you want a system local date, by the way.
(You definitely need to use AsQueryable , by the way? It's relatively rare.)
Jon skeet
source share