Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Ideas

Share your Designer Desktop product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

Use the ISO week date system

Hi there,

 

Would it be possible to use the ISO week date system, which everybody uses?

 

In numerous workflows, I used to define the week number of a date with the formula DateTimeFormat(d, "%W") and it was perfectly working till the 1st January, 2019.

But from this date, the week numbers defined by Alteryx are not the same than the ones in the calendar we all use!

 

Alteryx says that from the 1st to the 6th January, 2019, the week number is "00" instead of "01"!!! And so on until the week 52 which, for Alteryx, goes from the 30th to 31st or December, 2019: the week 52 has only 2 days!!

 

As the year 2018 begins with a Monday, there is no problem but for 2019 it is completely weird! And it will repeat in 2020...

 

The rule from the ISO week date system is pretty simple: "The ISO 8601 definition for week 01 is the week with the Gregorian year's first Thursday in it."

 

Please correct that

Simon

6 Comments
StephenF
8 - Asteroid

I look forward to this being fixed or a ISO week being added as an option. Shouldn't be a big deal to implement.

Gudo
6 - Meteoroid

Hi Simon,

 

I fully agree with the need to add the ISO 8601 system in alteryx. Not only for weeks, but also for years. Accounting years do not always end or start at the 31st of december or the 1st of jan.

 

As a workaround I found this formula elsewhere on the forum (cant locate the post atm) which gets the correct iso weeknumber 

 

ToNumber(PadLeft(ToString(FLOOR(DateTimeDiff(DateTimeAdd([Date],4-Switch(DateTimeFormat([Date],"%a"),7,"Mon",1,"Tue",2,"Wed",3,"Thu",4,"Fri",5,"Sat",6),"days"),DateTimeParse(ToString(ToNumber(DateTimeFormat(DateTimeAdd([Date],4-Switch(DateTimeFormat([Date],"%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"))

jdemeaux
8 - Asteroid

For reference purposes the formula above has been created by @BenMoss in this post : https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Convert-date-to-week-number-of-that-ye...

Aluminum_JKR
5 - Atom

Looking forward to this enhancement!

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Status changed to: Accepting Votes
 
se_alex
5 - Atom

Having that formula would be amazing and would help our developers!