Tuesday, May 29, 2007

Querying in CAML Relative to Today's Date

Found little information when searching for ways to perform date queries using CAML relative to today's date - only one reference to the use of OffsetDays from the article Customise the Content Query Web Part . Surprising the lack of information on this technique.

Here's the example from that article:

      <FieldRef Name="Created" Nullable="True" Type="DateTime"/>
Value Type="DateTime"><Today OffsetDays="-7"/></Value>

No comments: