Tuesday, January 4, 2011

Good article on Filters

Found a good article on filters for sharepoint here is a summary:

Now create a new view, call it something like “Due This Month” and setup the filter for

Start of Month is less than or equal to [Today]

AND

End of Month is greater than or equal to [Today]

Further tips

You can use this with date fields other than [Due Date] – e.g. [Created] for items created in the current month, [Modified] for items well… urm… modified in the current month!

Using the same technique you can also use the following formula

The current week (Sunday to Saturday inclusive)
Start Week =[Due Date] - WEEKDAY([Due Date]) +1
End Week =[Due Date] +7 - WEEKDAY([Due Date])

The previous month
Start Month =DATE(YEAR([Due Date]), MONTH([Due Date])+1, 1)
End Month =DATE(YEAR([Due Date]), MONTH([Due Date])+2,1)-1

The next month
Start Month =DATE(YEAR([Due Date]), MONTH([Due Date])-1, 1)
End Month =DATE(YEAR([Due Date]), MONTH([Due Date]),1)-1

The current year
Start Year =DATE(YEAR([Due Date]),1,1)
End Year =DATE(YEAR([Due Date]),12,31)

http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/