SPSRollUp - Hide expired items

admin posted on May 31, 2008 14:44

You can add a simple CAML query in order to hide the expired elements.

Use:

<Where>
  <Geq>
    <FieldRef Name=”Expires” />
    <Value Type=”DateTime”>
      <Today />
    </Value>
  </Geq>
</Where>

This query show only items which Expiration date is greater or equal than today date.

If you want use also the hour, you can use

<Where> 
  <Geq> 
    <FieldRef Name=”Expires” /> 
    <Value Type=”DateTime” IncludeTimeValue=”TRUE”> 
      <Today /> 
    </Value> 
  </Geq> 
</Where

Posted in: Tips Tricks  Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts