locked
Calendar odd REST filter query result RRS feed

  • Question

  • I'm writing a small calendar app I'm not really understanding the result I'm seeing when using REST filters against the SharePoint calendar.

    For example, these dates have events on them:

    2/19/2013 (4pm-5pm)

    2/21/2013 All Day Event (12am - 11:59pm)

    When I make call like this:

    Calendar?$filter=StartTime+eq+datetime'2013-02-19'    my event comes back correctly

    Calendar?$filter=StartTime+eq+datetime'2013-02-21' - nothing retured

    If I make a call to the day before which shouldn't have any events..

    Calendar?$filter=StartTime+eq+datetime'2013-02-20'  then the all day event on the 21st is returned.

    Is this expected behavior for all day events, meaning i need to account for it in my code? Btw, if I change it from an all day event, and set the start time to 12:05am, then it works fine. Weird that it doesn't consider 12am the start of the day? Or could it possibly be due to server time vs local time?


    • Edited by ChrisC_26 Wednesday, February 20, 2013 5:22 PM
    Wednesday, February 20, 2013 5:20 PM

Answers