ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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.

SUBMIT YOUR IDEA

Challenge #46: Formatting a Date from an Integer

The_Rad_Valentina
10 - Fireball
10 - Fireball

Done!

mceleavey
17 - Castor
17 - Castor

Just catching up...

 

Spoiler
I used a simple Switch function to replace the leading digit with a 19 or 20 depending on the represented year. This allowed me to create a recognisable date format where I could then use the DateTime tool to convert.:

switch(left([date],1),null(),"0","19","1","20")+
substring([date],1,6)

mceleavey_0-1686853089574.png

 

mceleavey_1-1686853109354.png


Simple.



Bulien

hlee36
8 - Asteroid

Attached is my solution

CSmith16
9 - Comet

Everyone using formulas makes me feel left out. 

 

Spoiler
CSmith16_0-1687284645534.pngCSmith16_1-1687284657987.png

 

CSmith16
9 - Comet

Saw a few people doing it in one formula tool. Figured I'd try as well. Hopefully I didn't steal the same formula as someone.

 

Spoiler
DateTimeParse(IF Left([date],1)="1" 
THEN REGEX_Replace([date],"(^1)","20")
ELSE REGEX_Replace([date], "(^0)","19") 
ENDIF,"%y%m%d")
CSmith16_0-1687285661114.pngCSmith16_1-1687285667698.png

 

IanHealey
8 - Asteroid

Solution

salmansaeeddata22
7 - Meteor

Formatted

tchakir
8 - Asteroid
Spoiler
tchakir_0-1687482656326.png

 

CBarito
8 - Asteroid

🙂

ejhaley
8 - Asteroid
8 - Asteroid
Spoiler
Capture.JPG