Filter the View Data Web Part to Last 3 Days

We have our own list, which has a column named "Date of connection" and should display the most recent elements of the list (relative to this column "Date of connection") in different places of the portal. the Data View web part is the best solution, but it's hard for me to find the right method and syntax for filtering by date.

I can create a parameter and filter the value for another column. I can filter for a specific date. I can’t understand how to say, "Show me all the elements of the list where the" Connection date "is in the range from [Today] and [Today] -3."

Is it possible? Does anyone know how to do this?

Thanks!

+3
source share
2 answers

if you use caml, you can do it.

<Where>
  <Gt>
      <FieldRef Name="Created" Nullable="True" Type="DateTime"/>
      <Value Type="DateTime"><Today OffsetDays="-7"/></Value>
  </Gt>
</Where>  
+5
source
+1
source

Source: https://habr.com/ru/post/1705724/


All Articles