Back in the day of Windows SharePoint Server 2 and SharePoint Server 2003 you couldn’t use [Today] in Filters.
For example if you tried to setup a filter like this to show items added in the last 7 days
Created is greater than [Today] – 7
You would receive an error “Filter Value is not a valid date” when clicking OK
This lead to all sorts of inventive work arounds including calculated columns to add 7 days onto the Created date and the trick to use [Today] in calculated columns.
After kicking up a bit of a storm with some ill considered remarks in a post explaining the limitations of the [Today] trick I realised I had some of my own old posts that needed updating. Live by the sword…
<tongue-in-cheek> The Truth about using [Today] in Filters </tongue-in-cheek>
In WSS 2 / SPS 2003 you could not use a filter containing a [Today] formula as shown above.
In WSS 3 / MOSS 2007 you can. If you try
Created is greater than [Today] – 7
you see a similar error -
Try taking out the spaces…
Created is greater than [Today]-7
Yup, that easy.
Just to make clear – you can use other fields. For example to to show all the tasks due in the next 7 days or overdue.
Due Date is less than [Today]+7 AND Status is not equal to Completed
If you are writing CAML queries then see this post about using the OffsetDays attribute.
Related posts:
- The Truth about using [Today] in SharePoint Calculated Columns This post offers workaround for using values like [Today] and...
- How To Use Filters in SharePoint to show items in the current Calendar Month Its very easy using the Filter feature of SharePoint...
- Advanced SharePoint View and Filter techniques Advanced SharePoint view and filter techniques focusing on the task...
- How To setup a SharePoint view filter to compare 2 list fields SharePoint workaround to create a list view based on a...
- Using [Today] in SharePoint calculated default values You can't use Today in SharePoint calculated columns but you...
Tags: Formula, SharePoint, Today


![today-in-wss2-fitler Created is greater than [Today] - 7](http://blog.pentalogic.net/wp-content/uploads/2008/11/today-in-wss2-fitler-300x116.png)

![today-in-wss3-filter Created is greater than [Today]-7](http://blog.pentalogic.net/wp-content/uploads/2008/11/today-in-wss3-filter-300x122.gif)

Thanks for that – a space was riving me mad!