How to Calculate the Week of the Year in a SharePoint Calculated Column
Question details
The user needs to calculate the week number of the year based on a specific date column (e.g., 'Deadline Draft') using a SharePoint calculated column formula.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Setting up a calculated column in a SharePoint list to track project weeks automatically from a given date.
- Observed behavior
- The standard calculation formula returns syntax errors when saving, primarily due to unsupported functions or conflicts with localized regional settings like Portuguese.
Verify that your target column (e.g., 'Deadline Draft') is formatted as a Date and Time column, and check your SharePoint site's regional settings to determine if you need commas or semicolons in your formula.
Apply the Week Number Formula and Adjust for Regional Settings
Use a custom mathematical formula to extract the week of the year, adjusting syntax for your specific language settings.
SharePoint calculated columns do not support the standard Excel WEEKNUM function. Instead, you must use a combination of INT, DATE, YEAR, and WEEKDAY functions to calculate the week manually. Additionally, non-US regional settings (such as Portuguese) require localized function names and semicolons instead of commas.
Navigate to your SharePoint list, click the gear icon in the top right corner, and select 'List settings'.
Scroll down to the Columns section and click 'Create column'. Name your column and select 'Calculated (calculation based on other columns)' as the type.
In the formula box, paste the following (replace 'Deadline Draft' with your exact column name): =INT(([Deadline Draft]-DATE(YEAR([Deadline Draft]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([Deadline Draft]),1,1)),"d")))/7)
If your SharePoint language is set to Portuguese or another European language, replace all commas (,) with semicolons (;) in the formula. You may also need to translate English function names (like YEAR and DATE) into your local language equivalents (like ANO and DATA).

Simplify Data Tracking with WPS Office
SharePoint formulas can be rigid and heavily dependent on regional settings. If you prefer a seamless, straightforward way to manage datasets and calculate dates, WPS Spreadsheet offers native functions like =WEEKNUM() without the syntax headaches. It is a powerful, free alternative to Microsoft Office that handles complex data with ease.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package.
- 2. Open Your Data: Launch WPS Spreadsheet and open your exported SharePoint list or Excel file.
- 3. Use Native Functions: Simply type =WEEKNUM(A2) to instantly calculate the week of the year without complex manual math.

Frequently Asked Questions
Why doesn't the WEEKNUM function work in SharePoint calculated columns?
SharePoint calculated columns use an older, restricted set of functions similar to early Excel versions. Native functions like WEEKNUM are not supported, meaning you must construct a mathematical formula to derive the week number.
How do I fix formula errors in a Portuguese SharePoint site?
In Portuguese and many other European regional settings, SharePoint expects semicolons (;) instead of commas (,) to separate arguments. You must also use the localized names for functions, such as 'ANO' instead of 'YEAR'.
How can I find the exact internal column name in SharePoint?
Go to your List Settings and click on the column name. Look at the URL in your browser's address bar; the internal name is the text that appears after 'Field=' at the very end of the URL.




