+2  A: 

That should work. Are you sure that there isn't another part of the query that triggered the exception? I have several instances of queries of the form

var query = from e in db.MyTable
            where e.AsOfDate <= DateTime.Now.Date
            select e;

in my code.

Jason
This worked: WHERE StartDateColumn <= GETDATE() //TodayThis did not: WHERE StartDateColumn.Date <= GETDATE() //TodayI had .Date in my statement - I must have been over thinking the issue.Thank you.kam
+1  A: 

I'm curious to the error message saying 'Date', when you're passing a 'DateTime'. Could it be that 'StartDateColumn' is actually a 'Date', rather than a 'DateTime' in the database? That might mess up the comparison...

David Hedlund
+2  A: 

It may be due to the date in the database being nullable. Try this:

var EmployeeName = from e in db.employee where e.StartDateColumn.Value <= startDT

Shiraz Bhaiji
+1  A: 

You can not use .Date

If you would like to check for today you can create a datetime with no time

DateTime myDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); var e = (from mds in myEntities.Table where mds.CreateDateTime >= myDate select mds).FirstOrDefault();

A: 

try this

DateTime dd = DateTime.Parse("08/13/2010 00:00:00");

            var data = from  n in ContributionEligibilities
                       where n.ModifiedDateTime.Date >= DateTime.Parse("08/13/2010").Date
                       select n; 
             data.Dump("Result") ;
Yousuf Qureshi