多的不说了,贴代码
Code
<Where>
<DateRangesOverlap>
<FieldRef Name='StartDate' />
<FieldRef Name='EndDate' />
<Value Type='DateTime'>
<Month />
</Value>
</DateRangesOverlap>
</Where>
<Where>
<DateRangesOverlap>
<FieldRef Name='StartDate' />
<FieldRef Name='EndDate' />
<Value Type='DateTime'>
<Month />
</Value>
</DateRangesOverlap>
</Where>
查询方式
Code
SPQuery query = new SPQuery();
query.ExpandRecurrence = true;
query.CalendarDate = DateTime.Now;
string caml = string.Format(@"<Where>
<DateRangesOverlap>
<FieldRef Name='EventDate' />
<FieldRef Name='EndDate' />
<FieldRef Name='RecurrenceID' />
<Value Type='DateTime' IncludeTimeValue='TRUE'>
<Month />
</Value>
</DateRangesOverlap>
</Where>");
SPQuery query = new SPQuery();
query.ExpandRecurrence = true;
query.CalendarDate = DateTime.Now;
string caml = string.Format(@"<Where>
<DateRangesOverlap>
<FieldRef Name='EventDate' />
<FieldRef Name='EndDate' />
<FieldRef Name='RecurrenceID' />
<Value Type='DateTime' IncludeTimeValue='TRUE'>
<Month />
</Value>
</DateRangesOverlap>
</Where>");
里面的条件可以为Today,Week,Month