SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a dataview web part displaying data from a list which I've designed using SharePoint designer. How do I filter it so that I show data from last year as well as the current year?

Note: It should be dynamic, keep changing based on the current date. Any help is appreciated. Thanks!

share|improve this question
up vote 0 down vote accepted

You can use a tool like U2U CAML builder to create a dynamic CAML query to put into the select command of the DVWP. This would be dynamic in that the CAML would utilize an offsetdays based off of [Today].

share|improve this answer
    
Thanks for replying. I can't use 3rd party tools but your comment gave me an idea: using CAML query to do it. Found out just what I wanted here: msdn – Akhoy Jan 11 '13 at 8:37
    
The tool is just used for building the CAML which in turn you'd put into the Select Command of the generated DVWP. – Eric Alexander Jan 11 '13 at 16:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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