Sunday, August 6, 2017

Filtering Items by Date Range using SharePoint 2013 REST API

If we  are using ListData.svc then the following query for filtering the data.

http://<Site URL>/_vti_bin/ListData.svc/Events?$select=Id,Title,StartTime,EndTime,AllDayEvent&$filter=StartTime ge datetime'2013-06-10' and EndTime lt datetime'2013-06-12'

 If we  are using REST API then the following query for filtering the data.

http://<Site URL>/_api/web/lists/getbytitle('events')/items?$select=Id,Title,Description,EventDate,EndDate,fAllDayEvent,Date3&$filter=Date3 ge datetime'2013-06-13T00:00:00Z' and Date3 le datetime'2013-06-14T00:00:00Z'


http://rambabuinsharepoint.blogspot.in/

No comments:

Post a Comment