I have added a SharePoint 2013 Content Query Web Part for displaying news items from a blog subsite, and would like to add a filter, so that, only "Publish Date" + 30 days will be displayed in the CQWP, for example, today is Dec 18, then a news item that was published prior to Nov 18 will be hidden. I need this to be dynamic. Please give me a clue on how to create the filter. thanks.
2 Answers
-
Hi Deepmala, thanks for your help, but I need to use the "Published" or "Created" in your example as the basis for the date calculation, not “today" ... so that, for example, when an item is 30 days after it was published/created, it will be removed from the CQWP.– T ZhangDec 18, 2017 at 8:27
-
I agree with Deepmala's method. If the items' created date is greater than [today]-30, means the items haven't created for 30 days. It will display in the CQWP. Dec 27, 2017 at 9:50
You cant use the published date field in the Content query web part. If you choose to use any other date fields, you can use the approach suggested by Deepmala