How to calculate week number
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
I want to get the week number for the week but week should start from Monday to Sunday.
For ex - Date = calendar week (EX 2021-11-03 = wk45)
and then rest of the column will be totaled by employee ID and week.
How can we do that?
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @sgaryali ,
To get the week number out of the date field, try the following expression:
DateTimeFormat([Date],"%W")
You can learn more about the datetime functions within Alteryx through the following link:
https://help.alteryx.com/20213/designer/datetime-functions
Hope that helps,
Angelos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for your reply.
But this not what I am looking at.
Basically I want week number for the whole week for ex - 01/11/2021 to 07/11/2021 - Wk 45 and week should always start from Monday and end at Sunday.
Then rest of the column calculation will be totaled by employee ID and week.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @sgaryali ,
If you're looking for the ISO weeknumber, maybe you try following the solution of this post:
The links included in the following link can also be very useful
Let me know if that works for you 🙂
Cheers,
Angelos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
We are currently building a workflow which gets the week number. But a week must be from Saturday to Friday. Any possible solution for this? Thanks.
PS. solved already:
IF [Day] In ("Sat", "Sun")
THEN ToNumber([Week_Number_Default]) +1
ELSE [Week_Number_Default]
ENDIF
Feel free to comment if it's not working or wrong 😀
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can use the Week Calculator to accurately find the week numbes. It will help you determine the correct calendar week for any date. Simply enter your date, and the tool will do the rest!
