OData / OData/odataorg.github.io
OData string error and problem with date formats
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 73
- Forks
- 106
- PR merge metrics
- No merged PRs in 30d
Description
I try to get data to excel with OData. When I use link below it works fine:
http://xts/odata/AuditAggregationOdata
or
http://xts/odata/AuditAggregationOdata/?$filter=(ObjectId%20eq%2041143%20)
But when I try to use some date range or funcion with date it does not work. I try to write everything but without right result:
http://xts/odata/AuditAggregationOdata/?$filter=year(FirstRead)%20eq%202016
Error message: Unable to connect We encountered an error while trying to connect Details: "Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Request failed: OData Version: 3 and 4, Error: The remote server returned an error: (500) Internal Server Error. (Exception has been thrown by the target of an invocation.) OData Version: 4, Error: The remote server returned an error: (500) Internal Server Error. (Internal Server Error) OData Version: 3, Error: The remote server returned an error: (500) Internal Server Error. (Exception has been thrown by the target of an invocation.)"
Or this one
http://xts/odata/AuditAggregationOdata/?$filter=(FirstRead%20gt%20datetime%272019-01-01T00:00:00Z%27%20and%20FirstRead%20lt%20datetime%272019-01-03T00:00:00Z%27)
Error message: Details: "Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Request failed: OData Version: 3 and 4, Error: The remote server returned an error: (400) Bad Request. (The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.DateTime' for operator kind 'GreaterThan'.) OData Version: 4, Error: The remote server returned an error: (500) Internal Server Error. (Internal Server Error) OData Version: 3, Error: The remote server returned an error: (400) Bad Request. (The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.DateTime' for operator kind 'GreaterThan'.)"
Note: Property Name="FirstRead" Type="Edm.DateTimeOffset"/
Thank you
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two reported requests against the AuditAggregationOdata endpoint, using the FirstRead property declared as Edm.DateTimeOffset. Compare the year filter and date-range query behavior, then verify that the supported query syntax produces the intended results or that the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100