Question

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?

Was it helpful?

Solution

Here you go :)

<Query>
  <Where>
    <Eq>
      <FieldRef Name="YOUR Approve By COLUMN" />
     <Value Type="DateTime" IncludeTimeValue="False"><Today OffsetDays="2"/> </Value>
    </Eq>
  </Where>
</Query>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top