I have a EntityDataSource and I have to filter all items older 30 days.
my approach on my MSSQL database:
protected void EntityDataSource1_Selecting(object sender, EntityDataSourceSelectingEventArgs e)
{
EntityDataSource1.WhereParameters.Clear();
EntityDataSource1.Where = "DATEDIFF(day, GETDATE(), it.CreateDate) < 30" ;
}
gives the error: DATEDIFF cannot be resolved into a valid type or function