Hey All,
I'm using the formula mentioned below to get a ISO week number but for date:1/2/2021 its turning week 53 instead of week 1, any ideas how to fix it? Thanks.
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Convert-date-to-week-number-of-that-year/td-p/158309
PadLeft(ToString(FLOOR(DateTimeDiff(DateTimeAdd([Field1],4-Switch(DateTimeFormat([Field1],"%a"),7,"Mon",1,"Tue",2,"Wed",3,"Thu",4,"Fri",5,"Sat",6),"days"),DateTimeParse(ToString(ToNumber(DateTimeFormat(DateTimeAdd([Field1],4-Switch(DateTimeFormat([Field1],"%a"),7,"Mon",1,"Tue",2,"Wed",3,"Thu",4,"Fri",5,"Sat",6),"days"),"%Y")))+'-01-01',"%Y-%m-%d"),"days")/7)+1),2,"0")