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

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 #58: An Odd String to Date Conversion

JoeM
Alteryx Alumni (Retired)

@DinoF, I will try to be more diligent with making more backward compatible workflows. Attached, I have a workflow that should work with your version. If you ever find yourself in a spot where you do not have a compatible workflow version, you can make is compatible (most of the time) by following this knowledgebase article.

 

Also, check out the "modify Alteryx workflow version" that @MarqueeCrew has posted on the Gallery!

DanielUpton
9 - Comet

Here's a solution on v11.  My first chance to play with the updated formula tool.  I like! 

DinoF
6 - Meteoroid

Hi there, thanks for the tip (modifying the XML with notepad) !

Cheers

DinoF
6 - Meteoroid

Well this was a good exercise  (more like a good break), you'll find my solution enclosed :) BTW the limitation on the lentgh to 7 char was a good one i'll give you that !

MarqueeCrew
20 - Arcturus
20 - Arcturus

@JoeM,

 

Used a single formula for this one.

 

Spoiler
datetimeparse(tostring(19+tonumber(left([date],1)))+substring([date],1,2)+right([date],4),"%Y%m%d")

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
JoeM
Alteryx Alumni (Retired)

@MarqueeCrew

Nicely done! Now I have to play too! I probably would have done something near identical to what you did, but decided to try to be creative and find another way.

 

Spoiler

tostring(tonumber(left([date],1))+19)+REGEX_Replace([date],".(.{2})(.{2})(.{2})","$1-$2-$3")

 

JoshK_dup_167
6 - Meteoroid

Regex + Formula tool

mceleavey
17 - Castor
17 - Castor

Ok, I may have taken a slightly different approach:

 

Spoiler
I first identified and isolated the first character of the string, which denotes the year, using the simple left([date],1) formula.
I then created a text input as a mapping table:

Text input.PNG

I then joined this table on the first character, then took the new year value.
I then simply appended the year to the rest of the data string, effectively replacing the first character with the appropriate year value. Then I simply parsed the date.
Solution.PNG


Bulien

SeanAdams
17 - Castor
17 - Castor

simple 3 box solution

Spoiler
formula to split
Date time convert to convert
Select to clean up
NicoleJohnson
ACE Emeritus
ACE Emeritus

My solution.

 

Spoiler
WeeklyChallenge58.JPG