Hi, I have a simple LinqToSql query
from p in GL_PROJECTs
where p.CREATE_DT == new DateTime(2009,10,26)
select new p
Some of the records in the database have create dates with time parts other than 00:00:00, so wont be retreived by this query. What I want to achieve is a time insensitive retrieval for the whole day.
I tried the following, adding Date, in an attempt to compare like for like:
from p in GL_PROJECTs
where p.CREATE_DT.Date >= new DateTime(2009,10,26)
select new p
but in LinqPad I get the following error:
'System.Nullable' does not contain a definition for 'Date' and no extension method 'Date' accepting a first argument of type 'System.Nullable' could be found (press F4 to add a using directive or assembly reference)
Any ideas why this doesnt work and what I can do to make it work?
Thanks