I had to use [Today] in a CAML query. I tried configuring the query with the U2U Caml Query Builder 2007, this was the output:
<Where>
<Eq>
<FieldRef Name='Modified' />
<Value Type='DateTime'>[Today-120Day(s)]</Value>
</Eq>
</Where>
But this did not work when a tried to run the query in code (SPQuery). I used this query instead, and it worked fine:
<Where>
<Eq>
<FieldRef Name='Modified' />
<Value Type='DateTime'><Today OffsetDays="-120"/></Value>
</Eq>
</Where>
3 comments:
thnx man, just what i needed.
Thanks! It helped me too!
Thanks a lot :) it helped !!!
Post a Comment