Display SharePoint list items based on date range

There was a request to display items (“How-To Tips”) based on a date range.  Seemed like a reasonable request, but I didn’t see anything out of the box that provided this functionality.  To get this done, the obvious choice was to use the Content Query Web Part (CQWP) and create a custom list that contained the tip items.  In the custom list, I created the columns: Tip Description, Tip URL (in case a tip linked to another page/site), Display Start Date and Display End Date and Background Image (the requester also wanted a pretty image for the background of this web part).


Now that I had those columns to work with, I added a CQWP to the page and edited the web part to use my custom list:


To get the date range functionality, I used the Additional Filters section and my Date columns to filter on items with a Display Start Date less than or equal to [Today] and a Display End Date greater than or equal to [Today]. 


All that is left to do is add items to the list that have the correct start and end dates and the tip(s) appear on the web part:



There is more to do with getting the background image.  I will blog that someday.

  1. Leave a comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: