New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GroupBy DateTime properties doesn't work #912
Comments
"Me too" and I think this may be related to #918 |
playing with it a bit more I managed to get this exception information from a simple "~/API/Type?$groupby((DateTimeField))" query ...
Here's the stack trace "cleaned up" ...
|
+1 |
I am still experiencing issues when trying to groupby a DateTime, is there a work around for this or has it been resolved? |
so it's been a good 18 months ... any movement on this @mtroth-microsoft ? |
I'm encountered this problem by so far... |
Yes, make a string property that represents your date and groups by it. |
@ElizabethOkerio did you check that this works for DateTimeOffset properties too (just highlighting a somewhat obvious escalation). |
@TehWardy yes this works for DateTimeOffset properties too. Have you had issues with DateTimeOffset properties? If so, please share. |
Grouping by DateTime properties does not work. EnableQuery attribute throws System.ArgumentException.
Assemblies affected
Microsoft.AspNet.OData 5.9.1
Reproduce steps
Sent a request that contains a grouping transformation on an entity for a DateTime property:
http://services.odata.org/V4/Northwind/Northwind.svc/Orders?$apply=groupby((OrderDate))
Expected result
The service should return grouped data.
Actual result
System.ArgumentException is thrown.
Additional details
The text was updated successfully, but these errors were encountered: