0

Any idea on this below scenario

In the case I have an item that starts at 01/01/2014 and ends at 01/01/2025 with a recurrence every Tuesday, the query returns all items from today until today + year.

That means that if today is 21st of October 2014, the query isn't returning items from 22nd October 2014.

UPDATE: After some tests I have detected a couple strange things:

  • If I use Year, the query returns what I have explained before.

  • If I use Month instead, the query returns all single events in Calendar Date’s month. Also, it returns some events outside the month (one or two at most).

  • If I use Today, it returns events occurred in today

I can't understand this behaviour, but waiting for a better answer

"<Query>" +
        "<Where>" +
            "<DateRangesOverlap>" +
                "<FieldRef Name='EventDate' />" +
                "<FieldRef Name='EndDate' />" +
                "<FieldRef Name='RecurrenceID' />" +
                "<Value Type='DateTime'>" +
                    "<Year />" +
                "</Value>" +
            "</DateRangesOverlap>" +
        "</Where>" +
        "<OrderBy>" +
            "<FieldRef Name='EventDate' />" +
        "</OrderBy>" +
    "</Query>";
  • When you say "That means that if today is 21st of October 2014, the query isn't returning items from 22nd October 2014." do you mean "isn't returning items from 22nd October 2015"? – Ryan Oct 23 '14 at 11:54
0

The query is returning recurrences of an item that are in the time period you specify.

  • If you're asking for things in the next year - you're getting that
  • If you're asking for recurrances during the day - you're getting that.
  • The month one is a litle strange - its returning items that will fit on a monthly calendar type view which can include a few days from the previous and next month.

E.g. in this monthly calendar from May 2011 you see 1st May until the 4th June (June is shaded blue)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.