Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I currently have a content query web part that has a filter on it to show items that have a published date less than or equal to [Today] and it works great.

The problem is I'd like to change this filter to be time based as well as day. I tried putting [Now] in the filter box, but it doesn't allow it.

Can anyone let me know how to change it from day based filter to time based filtering?

Current Setting

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I had a similar requirement and had to go into Sharepoint Designer to apply a query override:

QueryOverride="<OrderBy><FieldRef Name='PubDate' Ascending='FALSE' /></OrderBy><Where><Leq><FieldRef Name='PubDate' /><Value Type='DateTime' IncludeTimeValue='TRUE' StorageTZ='TRUE'><Today /></Value></Leq></Where>"

This details a fix without SPD, it's for 2007 but it can be done in other versions as well.

share|improve this answer
    
This worked perfectly - thank you! Any idea how I would add in the query to show only the last 10 posts as well? –  Averenix Oct 17 '13 at 23:10

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.