I have a site column of type Date and Time as follow:-

enter image description here

Now i want to query and get all items which have their Approve By exactly 2 days before Today. so let say today is 24 Sept 2020 then the query should return all items which have their Approve By = 22 Sept 2020? can anyone advice on this please?

1 Answer 1


Here you go :)

      <FieldRef Name="YOUR Approve By COLUMN" />
     <Value Type="DateTime" IncludeTimeValue="False"><Today OffsetDays="2"/> </Value>
  • 1
    your CAML query worked but i need to use 2 instead of -2.. please update your answer so i can accept it
    – John John
    Sep 25, 2020 at 13:36
  • 1
    I updated the answer
    – Marko Tica
    Sep 25, 2020 at 13:50
  • 1
    For future dates the value should be positive and for past dates negative.
    – Marko Tica
    Sep 25, 2020 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.