I’m using VB.NET FX 4.0 and EF.
In my code I use:
Dim query As System.Linq.IQueryable(Of MY_TABLE)
Dim sCondition As String = "it.DATE_IN = '" + searchDate + "'"
query = From c In MyContext.MY_TABLE .Where(sCondition ) Select c
There result always empty and my question is..
How to get only date portion from DATE_IN field, since the searchDate is only in format dd/MM/yyyy
You can use
EntityFunctions.TruncateTimeto remove the time part. Also you should use aDateTimerather than a string value when you compare the dates.