alteryx Community

# Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
###### IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

## Challenge #46: Formatting a Date from an Integer

6 - Meteoroid

my submission for challenge #46

8 - Asteroid

My solution - 2 Approaches

5 - Atom

My first weekly challenge!

8 - Asteroid

Solution

6 - Meteoroid

solution:

8 - Asteroid

solution

8 - Asteroid

My solution

8 - Asteroid

I recently learned that I could use REGEX in formulas (yes, I'm still new at this 🙂), and this challenge was a GREAT opportunity to implement that knowledge!

Spoiler

8 - Asteroid

I tried a suggested solution: DateTimeParse(switch(Left([date],1),'','0','19','1','20')+Right([date],6),'%Y%m%d'); but since the string length is set to "7," the 8th character gets truncated when "19" or "20" are added to the left of the[date] string.  However, if the result is created in a [New Date] column, the string length of the new column be changed to "10" in the Formula tool. 👍

7 - Meteor

Done!