I have a datetime variable officeStartTime in which the datetime value is specified as
officeStartTime = {9/24/2013 10:00:00 AM}
and I have a CHECKINOUT module that contains userid , checktime and other properties.
Now I want to get a list of CHECKINOUT records whose part of the scan time is longer than the temporary part of officeStartTime .
I'm trying to:
var checklist= con.CHECKINOUTs.Where(x => x.CHECKTIME.TimeOfDay > officeStartTime.TimeOfDay);
checklist contains the following error:
{"The specified type member 'TimeOfDay' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported."} .
He says that TimeOfDay not supported in LINQ for Entities, if so, how can I check the time portion of the datetime in LINQ. Is there any other way to do this? Please suggest me what to do.
Thanks.
link2jagann
source share