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

AryCardoso
8 - Asteroid
 
aanandkumar
8 - Asteroid
 
MDel
8 - Asteroid
 
samahmed28
6 - Meteoroid

Solved

ChiN
Alteryx Alumni (Retired)

Pretty good exercise for date time practice ! 

carmenrapariz
8 - Asteroid

Did it!

PeterH23
8 - Asteroid

My solution.

Spoiler
Solution#46.png
Preethi07
6 - Meteoroid

I used left((if Substring([date],0,1)='0' then '19' else '20' endif)+ToString(Substring([date],1,length([date]))),4)+"-"+Substring([date],3,2)+"-"+Substring([date],5,2) to get the results.

But interested in understanding the efficiency of using Left/right vs. Substring;switch vs. if..else.

Simha
9 - Comet

Here's one of the ways...

kwilkins
7 - Meteor

Attached is my solution using formula, date/time parse tool and select... the solution is much slicker. I've never used a datetimeparse tool before...I'll have to remember that.

Spoiler
SPOILER