Filter REST call on SharePoint with DateTime value

As you may know, using the REST API in SharePoint 2010 is a very flexible and powerful way to retrieve data from SharePoint. I love the way I can use the ListData.svc to get data form lists and document libraries. Finding the correct syntax however can sometimes be challenging…

Today, I found myself looking for a way of retrieving items from a calendar list. Getting the calendar items themselves wasn’t a problem, try to filter the items for only the current items (today and greater) was.

After some Googling and several syntax attempts I found out the right way to do it.
Say I only want to  get calendar items that start  on November 23, 2011 or beyond…


Works like a charm…

Update March 27, 2012
Because of the question Michal asked I retested some scenario’s. It turns out you cannot filter on time values. Real bummer :(


will filter on dates, greater or equal than 2011-11-23. It will not filter on 09:00, so an event taking place at i.e. 08:00 will be returned in the result set.

Therefore, there is no need to specify the time and you can filter without the time part of the query, like this:


If I’m wrong, please let me know…


7 thoughts on “Filter REST call on SharePoint with DateTime value

    1. Ernst Wolthaus Post author

      Hi Michal,

      Good question! I’ve tested your filter string and it turns out you can filter with dates but NOT with time. Real bummer :(

      I have updated the blog post accordingly.

      1. Michal Hainc

        Hi Ernst thank you for updating the blog post, … yes… it is a bummer indeed…
        and I feel like there is million of such bummers hidden in the sharepoint monster… :(

        going to think about a workaround

  1. Pingback: SharePoint 2013 et l’agrégation de données provenant du SI puis exposition à une application mobile | SharePoint 2013 - Blog technique d'Alexandre DAVID

  2. Pingback: REST API filter by start and end dates using 'today' | DL-UAT

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>