Hello All,
I am working on MVC application. in that i have one LINQ query where i am filtering data with datevalue..
For that i have written this code;
offers = offers.Where(x => arrStartDt.Contains(x.StartDate.ToString("MM/yyyy")));
In this arrStartDt is a array of date like Month/Year like;
01/2009
02/2010
04/2009
etc.
x.StartDate is a DateTime.....
So i want to filter all the data which has start date in these months with year....
But above statement throws error like this;
Method 'System.String ToString(System.String)' has no supported translation to SQL.
Can you please help me in this filter?????