In line with my organisation's start of the week, I want to start it from a Saturday. I've looked at the %w which has 0 as Sunday. Is anyone able to help me understand how I can start day of the week as Saturday? Very new to Alteryx. TIA
I have date: day_dt= DateTimeAdd([start_date],[RowCount]-1,'days') which starts 2018-01-01
day_name= DateTimeFormat([day_dt],"%A")
I then did the w% calculation= tonumber(datetimeformat([day_dt], '%w')) which brings back Sunday as 0. But our week starts on a Saturday.
Solved! Go to Solution.
Can you share some data to put this into more context?
Tried to add a couple of bits into the original post - is that helpful?
check this: https://help.alteryx.com/20223/designer/datetime-functions
If your date isn't the the ISO format YYYY-MM-DD, it won't be recognised in Alteryx as a date datatype, i.e.
convert it using datetime tool as a first step (if you need to do this part):
Then after this, you can use the formula tool to access the weekday name:
You can then do something like this using the SWITCH function in the formula tool:
This allows you to map different numbers to the days of the week.
There's probably other ways to do this of course! 😁
Thank you! This worked :)
Do you want something like this?
Mod(ToNumber(DateTimeFormat([Date],"%w"))+1,7)
@HB_96
Sharing similar info to what some of the comments here have. The workflow will allow you to set your: Start Week number and also allow you to adjust your Day # of the Week.
Start Your Week on Your favorite Day is created in relation to setting (Week Start Day, Week Start Number, Day of Week Start)