Loading

How to calculate week number relate to reference date

Udgivelsesdato: Feb 27, 2025
Opgave

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

Trin
Create the following calculation:

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

User-added image
Vidensartikelnummer

001458729

 
Indlæser
Salesforce Help | Article