Does anyone know how to convert date format CYYYYMMDD to MM/DD/YYYY?
Hi @blitz45 if you use this syntax in a formula tool should work DatetimeFormat(datetimeparse((IF LEFT([date],1)="1" THEN "20" ELSE "19" ENDIF)+RIGHT([date],6),'%Y%m%d'),"%m/%d/%Y")
This was one of the weekly challenges
https://community.alteryx.com/t5/Weekly-Challenge/Challenge-58-An-Odd-String-to-Date-Conversion/td-p/47283
I suggest:
DatetimeFormat(DateTimeParse([Input],"C%Y%m%d"),"%m/%d/%Y")
Sample attached.
Might be easiest to strip the first character with a formula tool, then use a date time tool to convert the string to a standard date format then use another date time tool taking the newly created date field and send back to a string in the exact format you desire.
What if it is in the format below:
0940301 (March 01,1994) *0= within the year 1900s
1190521 (May 21, 2019) *1= within the year 2000s