Question

We have a custom list that has a column called "Connection Date" and need to display the most recent list items (relative to this "Connection Date" column) in various places across the portal. the Data View Web Part appears to be the best solution, but I'm having difficulty finding the right method & syntax to filter by date.

I can create a parameter and filter by a value for another column. I can filter by a specific date. I can't seem to figure out how to say "Show me all list items where 'Connection Date' is in the range of [Today] and [Today]-3".

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

Thanks!

Was it helpful?

Solution

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>  

OTHER TIPS

thanks a bunch. between this response and this blog we were able to get this figured out.

http://blogs.msdn.com/sharepointdesigner/archive/2008/02/25/filtering-and-formatting-with-date-values.aspx#filter_list_on_today_offset

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top