What is the difference between CAML Offset and OffsetDays?
OffsetDays are same.
OffsetDays is the correct one to use
Microsoft as always failed to document this.
This link no longer exists:
Scenario 1 : If you are checking for the items having "Due Date" field value as "Today", then this would be the query for you:
<Where> <Eq> <FieldRef Name="DueDate" /> <Value Type="DateTime"> <Today/> </Value> </Eq> </Where>
Scenario 2 : what if you want something dynamic? Ex. If you want to get the items, having "Due Date" 5 days before Today. For this you can't give a static day, because "Today" changes daily. Option is "OffsetDays". The Query goes like this :
<Where> <Eq> <FieldRef Name="DueDate" /> <Value Type="DateTime"> <Today OffsetDays="-5" /> ----------> for future dates the value should be positive. </Value> </Eq> </Where>
In many documents they have mentioned Offset instead of "OffsetDays"... better be careful while checking...