Tag: datetime comparison

如何在EF中执行日期部分比较

我听说人们说日期时间比较不起作用只是因为时间部分,因为datetime有时间部分。 在SQL中我总是像这样比较日期时间,它工作正常 select * from employee where convert(varchar,dob,112) > ‘20111201’ // this yyyymmdd format. 我怎么能在LINQ查询中模拟这个?