0 out of 2 rated this helpful - Rate this topic

DateRangesOverlap Element (Query)

Published: May 2010

Used in queries to compare the dates in a recurring event with a specified DateTime value, to determine whether they overlap.


<DateRangesOverlap>
  <FieldRef Name = "Field_Name"/>
  <Value Type = "Field_Type"/>
  <XML />
</DateRangesOverlap>

Attribute

Description

None

N/A

Minimum: 0

Maximum: Unbounded

The following example compares the event date and end date of a recurring event with the current date and time.

<Query>
   <Where>
      <DateRangesOverlap>
         <FieldRef Name="EventDate"></FieldRef>
         <FieldRef Name="EndDate"></FieldRef>
         <FieldRef Name="RecurrenceID"></FieldRef>
         <Value Type="DateTime">
            <Now/>
         </Value>
      </DateRangesOverlap>
   </Where>
</Query>

Date

Description

Reason

May 2010

Initial publication

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Doesn't Really work...
Try it.  No matter what you do, you don't see RecurrenceId in the data.  Setting the list CalendarDate property to a given day, and then looking for the recurring event in your data set only works intermittently.  Setting a value for the view fields also changes the behavior of the query for no apparent reason.