DCSIMG
June 2008 - Posts - sps

sps

June 2008 - Posts

How to calculate Week Number by SharePoint formula

Many times I was asked to filter Task List by week number (e.g show this week task) .

In this post, I'll Explain how to calculate week number with SharePoint formula.

1. First step, create your SharePoint list and add calculate filed.

2. Add the following formula

=INT(([Start Date]-DATE(YEAR([Start Date]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([Start Date]),1,1)),"d")))/7)+1

Formula description

= ({Calculate the distance between the begging of the year to the current date} + {the first day of the week in which the year begins})/ {Number of day per week} + {1}

clip_image002

Enjoy