community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Announcement | Get certified today - take the Alteryx Designer Core and Advanced exams on-demand now!

Challenge #46: Formatting a Date from an Integer

Alteryx Partner

My solution.

Highlighted
Meteor

My solution for this weeks challenge! 

Asteroid

Hi! Here my solution :)

A silly way but...

Spoiler
REGEX_Replace(ToString(ToNumber([date])+19000000),"(\d{4})(\d{2})(\d{2})","$1-$2-$3")
Comet

Completing old challenges.  Could be done in one tool, but faster to use DateTime tool

Alteryx
Alteryx

Used the ReplaceFirst function- although after looking at other solutions I think I will give this ago with using the Switch function as I haven't used this before. 

Asteroid

My solution

Alteryx Partner

My Solution attached.

 

Cheers

Asteroid

STEP 1: Use Formula tool to get the exact year

STEP 2: Parse the string to Date format using DateTime Parse tool

STEP 3: Select the desired Columns for output

 

Happy Practice :)

Asteroid

My solution