Hi Team,
Is there a way to get the number of a weekday out of a date?
Currently my data set is like below type: V_string.
I want to have a new column next to this Ac.GI date which say like:
"5" for the 12.11.2021 (Friday) etc...
Solved! Go to Solution.
DateTimeFormat([Ac.GI date],'%w')
Goes from Sunday = 0 to Saturday = 6
Hi @Christina_H
If I just add the formula I only have nulls. Can you please check attached file and let me know if I need to chance any format or so?
BR,
Pascal
Hello @Pascal_R ,
Just one little thing to add here would be if you want to be sunday the seventh day insted of the first would be to add a replace to the formula too.
Replace(DateTimeFormat([Field1],'%w'),'0','7')
Regards
Hello @Pascal_R ,
You need first to transform the dates to actual dates that Alteryx can understand. As the stand on your file they are interpreted just as text. Try using this
Replace(DateTimeFormat(DateTimeParse([Ac.GI date],'%d.%m.%y'),'%w'),'0','7')
Regards
Is there a way to have it where Sunday is 1, Monday 2, etc.?
Use ToNumber(DateTimeFormat([Date], "%w"))+1
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |