I am trying to compare a date to a datetime field in SQL. I try this:
Dim entry = db.Tbl_Hydrations.Where(Function(x) x.Hyd_Create_Date.Date = _date1)
However, the error I get is:
The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
On line:
If entry.Any Then
Seems like LINQ to Entities doesn’t support the Date property. You could try doing a comparison between two dates as a workaround: