I am using CAML query for SharePoint calender list. I am able fetch proper daily data. but when i choose weekly, monthly and yearly, it doesn't give me reports as expected. it doesn't take date specified rather it takes start date of present week.

how can i solve this problem?

qryBookings.Query = 
            <FieldRef Name='EventDate'/>
            <FieldRef Name='EndDate'/>
            <FieldRef Name='RecurrenceID'/>
            <Value Type='DateTime'>
                <FieldRef Name='Place'/>
                <Value Type='Lookup'>" + d.SelectedItem.Text + "</Value>
                <FieldRef Name='Test'/>
                <Value Type='Lookup'>" + R.SelectedItem.Text + "</Value>

qryBookings.CalendarDate = DateTime.Parse(txtDate.Text);
qryBookings.ExpandRecurrence = true;
  • Could you add some of your CAML-Query, it would be much easier to solve your problem. Thank you!
    – Benny Skogberg
    Commented Aug 20, 2014 at 6:42
  • please see my update question Commented Aug 20, 2014 at 7:01
  • Super! I took the liberty to make it more readable. Thank you!
    – Benny Skogberg
    Commented Aug 20, 2014 at 7:09
  • me too have similar problem, i am trying to generate reports based on start and end date, but reccurent entries are not getting displayed if I don't use <DateRangesOverlap> Commented Aug 23, 2014 at 7:44

5 Answers 5


The weekly approach starts with the first day of current week. I guess there is nothing you can do about this, except always to work on Sunday ;-)

I guess the point is to make a function of your own to compute desire starting and ending date. Then apply the correct "BETWEEN" statement in CAML. With GREATER and LESSER since there is no shortcut.

Hope that helps


Not sure why this is not working, but an alternative would be to apply the filtering directly in the CAML Query.

First step would be to decompose the DateTime.Now into its year, month and day parts. Based on that you can generate a Start Date and an End Date and pass those in the CAML, filtering by StartDate (EventDate) and EndDate.


You can use a usefull tool called CAML Builder, really helping :) : http://www.u2u.be/Software


In CAML query you can use <BeginsWith> tag to solve your problem. You can also use <Leq> or <Geq>.

Refer these below link which may helps you.


I am using the old soap service (Lists.asmx, GetListItems) to retrieve calender items for the current month. Used this webservice to be able to retrieve recurrences. My query is very similar to yours except that I am supplying the start date in a different way.


              <Geq><FieldRef Name="EndDate"/><Value Type="DateTime">" + monthStartDate + "</Value></Geq>
              <FieldRef Name="EventDate" />
              <FieldRef Name="EndDate" />
              <FieldRef Name="RecurrenceID" />
              <Value Type='DateTime'><Month/></Value>


             <CalendarDate>" + monthStartDate + "</CalendarDate>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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