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
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5