Skip

SharePoint CQWP: How to use today's date to compare to another field
November 15, 2009 4:38 PM   Subscribe

SharePoint CQWP: How on earth can I use today's date to compare to another field in a calculated column or filter in SharePoint?

(WSS 3.0, MOSS 2007) We have two subsites that have announcements lists which we are using to display deadlines. We are using the Content Query Web Part on the parent site homepage to roll up the deadlines from both subsites. Project manager only wants deadlines that will be expiring within the next seven days to display in the CQWP. This seemed like an easy task to complete ... just use the filter in the CQWP. However, I cannot figure out how to get it to allow for [Expires]-7 or otherwise use Today, Date or Now functions in a calculation.

My first solution was to create a calculated column to determine the beginning date to display the deadline (using the formula of [Expires]-7). The column displays fine in the list, but I wasn't able to get this to work in the CQWP filter because it didn't see this calculated column as a date field, even though I selected "Date" data type when I created it.

My second attempt was to try to create a "countdown" of days until [Expires], wherein I ran into the Today function limitation in calculated fields.

Am I going about this the wrong way or overlooking the obvious? What is the easiest way to achieve this? I'm new to SharePoint, and any guidance is appreciated.
posted by momzilla to Computers & Internet (1 answer total) 1 user marked this as a favorite
 
Over at EndUserSharePoint.com there are a series of articles on calculations & dates even - that may be helpful:

http://www.endusersharepoint.com/

Specifically, the "Calculated Column" series by Dessie Lunsford - there is a 7-part series on Date/time alone.
posted by jkaczor at 8:01 PM on November 16, 2009


« Older What are the Reserves (specifi...   |  LactoseFilter: Where can I get... Newer »
This thread is closed to new comments.


Post