问题
I following CAML Query does not work:
<Where><DateRangesOverlap><FieldRef Name=\"EventDate\" /><FieldRef Name=\"RecurrenceID\" /><Value Type=\"DateTime\"><Week /></Value></DateRangesOverlap></Where>
AND
<Where><DateRangesOverlap><FieldRef Name=\"EventDate\" /><FieldRef Name=\"RecurrenceID\" /><Value Type=\"DateTime\"><Month/></Value></DateRangesOverlap></Where>
But this one works:
<Where><DateRangesOverlap><FieldRef Name=\"EventDate\" /><FieldRef Name=\"RecurrenceID\" /><Value Type=\"DateTime\"><Yearly /></Value></DateRangesOverlap></Where>
The only difference is that the working query has <Yearly />
as Date time and the non working queries have <Week />
and <Month />
.
This is a big issue for me as it has a big performance impact. Can someone provide some guidance as to what muight be happening here?
回答1:
The DateRangesOverlap has many issues, the one you are facing might be explained here: Issue. The same author has provided a solution Solution
来源:https://stackoverflow.com/questions/15704978/caml-query-for-week-and-month-not-working