In the db table the dates are stored in a char(8) field in this format yyyyMMdd. How do I query for a date range?
I tried the following and it does not work:
context.Where(p=> Convert.ToDateTime(p.Date) >= Convert.ToDateTime('20120411');
context.Where(p=> Convert.ToInt32(p.Date) >= Convert.ToInt32('20120411');
context.Where(p=> int.Parse(p.Date) >= int.Parse('20120411');
From what I've read a possible way is to use EntityFunctions class but I'm not sure how to construct the query. Any ideas on how to do this?