ISO Week Number Calculation | Community
Skip to main content
January 9, 2025
Solved

ISO Week Number Calculation

  • January 9, 2025
  • 1 reply
  • 419 views

Hello everyone! 

 

I have searched the community to find a solution for our problem, but I think I did not find anything matching it just yet. 

We are using the following calculation to identify the week number (taken from: https://experienceleaguecommunities.adobe.com/t5/workfront-questions/week-number-calculation/m-p/500626#M32376)

ROUND((((DATEDIFF({entryDate},DATE(CONCAT("1/1/",YEAR({entryDate}))))+1)-(8-DAYOFWEEK(DATE(CONCAT("1/1/",YEAR({entryDate})))))-DAYOFWEEK({entryDate}))/7)+2,0)

 

Our problem is, that DAYOFWEEK is not following the ISO-Week format, meaning it considers Sunday as the first day of the week.

 

Does anyone here know how to adjust the formula above to match the ISO-Week format? 

Any help would be very much appreciated! 🙂

 

Best,

 

Marius

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by monicacardoso

Hi @mariusuz1,

 

Thank you for your question! Try this: 

 

ROUND((((DATEDIFF({entryDate},DATE(CONCAT("1/1/",YEAR({entryDate}))))+1)-(9-MOD(DAYOFWEEK(DATE(CONCAT("1/1/",YEAR({entryDate}))))+5,7))-MOD(DAYOFWEEK({entryDate})+5,7))/7)+2,0)

 

- Monica 

1 reply

monicacardosoAdobe EmployeeAccepted solution
Adobe Employee
January 22, 2025

Hi @mariusuz1,

 

Thank you for your question! Try this: 

 

ROUND((((DATEDIFF({entryDate},DATE(CONCAT("1/1/",YEAR({entryDate}))))+1)-(9-MOD(DAYOFWEEK(DATE(CONCAT("1/1/",YEAR({entryDate}))))+5,7))-MOD(DAYOFWEEK({entryDate})+5,7))/7)+2,0)

 

- Monica