Linq Query to Filter Date

Hi, I currently have a linq query which works fine for filtering date if a date is more or less than another. But != operator throws error, I would like to filter those that are not this specific date.

Query: dtReport.AsEnumerable.Where(Function(r) If(IsDate(r(“Hire Date”).ToString.Trim), Date.ParseExact( r(“Hire Date”).ToString.Trim,“MM/dd/yyyy hh:mm:ss”,System.Globalization.DateTimeFormatInfo.InvariantInfo) != CheckDate, False)).CopyToDatatable

Hi @niro

I think in vb not equal to is <> and in c# it is != , Try the vb one instead…

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.