tag:blogger.com,1999:blog-7384653670825187633.post3254595384547100087..comments2024-01-18T05:01:51.538-08:00Comments on Ivan on Software: Filtering Items by Date Range using SharePoint 2013 REST APIIvan Neganovhttp://www.blogger.com/profile/17959856507854938011noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-7384653670825187633.post-57257526280916453162014-12-09T08:27:17.708-08:002014-12-09T08:27:17.708-08:00Ivan, I'm having some additional issues with f...Ivan, I'm having some additional issues with filtering based on the comparison of two datetime fields. I'm just trying a simple gt here ($filter=ExpectedDelivery gt NeededBy) but it actually causes a 400 bad request error. Do you see the same thing on any of your on prem systems? I have a SP SE question on this. http://sharepoint.stackexchange.com/q/123578/4170RKaucherhttps://www.blogger.com/profile/03446475105297879875noreply@blogger.comtag:blogger.com,1999:blog-7384653670825187633.post-70984148265197954232014-02-27T02:33:18.082-08:002014-02-27T02:33:18.082-08:00Nice very helpful article Nice very helpful article Piyush Wattamwarhttps://www.blogger.com/profile/14293899705628678524noreply@blogger.comtag:blogger.com,1999:blog-7384653670825187633.post-68350587458289829322014-01-23T06:54:45.465-08:002014-01-23T06:54:45.465-08:00The OData.org actually itself has the type specifi...The OData.org actually itself has the type specification here: http://www.odata.org/documentation/overview/#AbstractTypeSystem <br />so to me the "datetime" is rather a type identifier, a part of the protocol, than an operator. It also makes sense for MSDN not to have detailed info on this, otherwise it would be redundant.Ivan Neganovhttps://www.blogger.com/profile/17959856507854938011noreply@blogger.comtag:blogger.com,1999:blog-7384653670825187633.post-35393887651414059302014-01-22T16:19:43.313-08:002014-01-22T16:19:43.313-08:00Hi,
Thanks for the post. It was very helpful.
I w...Hi,<br />Thanks for the post. It was very helpful.<br /><br />I was wondering how you knew to use the datetime operator in the querystring. I had been trying to use the date functions from OData v3 spec and I always received the generic error: 'The query is not valid.'<br /><br />It was my understanding that SharePoint 2013 REST API's used OData v3 and I was referencing the documentation on filters for dates here:<br />http://www.odata.org/documentation/odata-v3-documentation/url-conventions/#512412_year<br />Which suggests to build a query like: <br />$filter=year(BirthDate) eq 1971<br />which will not work. Did you find some resource on MSDN that I may look at.Anonymoushttps://www.blogger.com/profile/09499544191031668590noreply@blogger.com