Loading

How to calculate week number relate to reference date

Date de publication: Feb 27, 2025
Tâche

How to calculate the week number relate to reference date

For example:
Set reference date as 2022-06-01
Expected result:
2022-06-01~2022-06-04: week 1
2022-06-05~2022-06-11: week 2
2022-06-13~2022-06-18: week 3

Étapes
Create the following calculation:

INT(
(DATEDIFF('day',[reference date],[Date])-
DATEPART('weekday',[reference date]))
/7+1)+1

User-added image
Numéro d’article de la base de connaissances

001458729

 
Chargement
Salesforce Help | Article