How can I use XMP in Sharepoint metadata?

SharePoint CQWP: How to use today's date to compare to another field

  • 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.

  • Answer:

    Over at EndUserSharePoint.com there are a series of articles on calculations & dates even - that may be helpful: http://www.endusersharepoint.com/ Specifically, the "http://www.endusersharepoint.com/category/authors/dessie-lunsford/" series by Dessie Lunsford - there is a 7-part series on Date/time alone.

momzilla at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.