What's the REST syntax for TODAY()?

I'm new to javascript/REST and I'm trying to run a REST api against a SharePoint list of Events.  What's the syntax to show only the dates greater than or equal today (see below) 

..._api/web/lists/getbytitle('Events')/items?$select=Id,EventDate,Location&$filter=EventDate ge TODAY()

???

March 18th, 2015 3:14pm

TODAY option doesn't seem to be available in SharePoint REST. An alternative is to create a JavaScript Variable to hold date represented by today, convert it to ISO date format and use that in REST query:

var today = new Date();

api/web/lists/getbytitle('Events')/items?$select=Id,EventDate,Location&$filter=EventDate ge '" + today.toISOString() + "'


Source: http://sharepoint.stackexchange.com/questions/105576/rest-api-filter-by-start-and-end-dates-using-today

Free Windows Admin Tool Kit Click here and download it now
March 19th, 2015 12:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics