When filtering the data for an Export, I need to to use this filter: XDate > = ${InitialDate}
where XDate is of type DateTime
When I execute the Export I get this:
-
Vuelos.ExportController.ApplyQuery(IQueryable items, IQueryCollection query) in ExportController.cs
- items = items.Where(filter);
-
Vuelos.ExportValesController.ExportDbVuelosToExcel(string fileName) in ExportValesController.cs
- return ToExcel(ApplyQuery(await service.GetDbVuelos(), Request.Query), fileName);
-
lambda_method481(Closure , object )
How can I fix it?
I solved this issue by formatting the DateTime parameters as 'yyyy-MM-dd'. This is only needed when using Export; not when calling the stored procedure.
Now it works.