Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEANumber 11
RegEx! It's your friend!
For this one I used a Formula tool with a bunch of formula in series:
[Year]
IF Left([date],1) = "1" THEN 20
ELSE 19
ENDIF
[date2]
Right([date],6)
[date_result]
[Year]+[date2]
I then used a RegEx to slice out the yyyy,mm,dd:
(\d{4})(\d{2})(\d{2})
and then another Formula tool to rehypothecate (!!!) the string
[yyyy]+"-"+[mm]+"-"+[dd]
and finally a Select tool to tidy up.
DateTime tool remains a favorite of mine!