Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Get monthly week number and day name from date time field

ArnabSengupta
8 - Asteroid

Hi All,

 

I want to get the week number (Monthly) from my date time field.

 

For e.g. 2020-08-25 18:43:31 = Tuesday, 4

              2020-03-24 1:25:30= Monday, 4

              2020-07-14 13:20:40= Tuesday, 2 etc

 

Help is much appreciated.

 

Thank you!

4 REPLIES 4
vizAlter
12 - Quasar

 

Hi @ArnabSengupta — Hope, the attached solution will be helpful.

 

FYI: 

%U — This will return the week number, as 00-53, with the beginning of weeks as Sunday.

%W — This will return the week number, as 00-53, with the beginning of weeks as Monday.

 

vizAlter_0-1598651977449.png

vizAlter_1-1598652025941.png

 

vizAlter
12 - Quasar

@ArnabSengupta — Thank you!

Bazal
5 - Atom

I'm looking to build a similar flow but where the 1st of every month is considered as the starting date for counting week instead of a Monday/Sunday or any other day for that matter. 

For example, 2023-12-04 is Week02 with this flow whereas I would need it to be considered as Week01; similarly, 30th/31st is last week.

 

Along with this, I would need to have the month name column, so the final output is two columns: Month and Week no. of the month.

 

Can you please help me with that?

Pratik1996
6 - Meteoroid

Try this solution and confirm.

 

 

image.png

 

Labels