Open ghost opened 3 years ago
@bascott From your repo, "Date" property is "DateTime" type, in this case:
1) Would you please use the "date" build-in method in the query. date(Date)%20in%20(2020-12-09)
2) Could you please "Date" CLR type to define the "Date" Property.
@xuzhg I attempted both and received the same error message.
Same problem for a property of type Edm.Date
.
Attempting to use
in
operator in a$filter
clause on fields of typeEdm.DateTimeOffset
returns an error from the server.Assemblies affected
Microsoft.AspNetCore.OData 8.0.0-preview2
Reproduce steps
See simple project setup at https://github.com/bascott/odata-example
Run the project, then navigate to https://localhost:5001/odata/WeatherForecasts?$filter=Date%20in%20(2020-12-09) or https://localhost:5001/odata/WeatherForecasts?$filter=Date%20in%20(2020-12-09T00:00:00-05:00)
Expected result
Result would be filtered on supplied date.
Actual result
Expanded error returned from server: