I\'m trying to run the following bit of code, but the comparison fails by not handing my the entities I expect it to.
It\'s comparing 06/09/2011 0:00:00
06/09/2011 0:00:00
You can also use EntityFunctions.TruncateTime() under the namespace System.Data.Objects
EntityFunctions.TruncateTime()
System.Data.Objects
Ex.
db.Orders.Where(i => EntityFunctions.TruncateTime(i.OrderFinishDate) == EntityFunctions.TruncateTime(dtBillDate) && i.Status == "B")
Works like charm.