学习:Sharepoint2010-- List -- View Filter: date

 

Create a column, as below:

 

Set the calculated columns formula

 

The formula as below:

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)

 

Edit

I should make clear that this technique will not work correctly on Event lists with recurring event as SharePoint only records the start time of the first event, not each occurrence in the series.

 

文章来源:

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

http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/

 

你可能感兴趣的:(SharePoint)