Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Date conversion from string format to date format

Thordust16
7 - Meteor

HI 

 

I have below issue when converting date format from yyyy-mm-dd to mm/dd/yyyy.

 

I'm losing some of the string data in the same column is there a solution to avoid this..?

 

 

3 REPLIES 3
tcroberts
12 - Quasar

Is there a finite number of potential string values in that field? My immediate thought for a solution would be, rather than use the DateTime Tool, you could use the Formula Tool do some sort of conditional statement, looking for key words like 'Risk", and if not found, then perform: DateTimeFormat([Field1], "%m/%d/%Y").

 

Perhaps something like:

 

datetimewithstrings.PNG

Thordust16
7 - Meteor

There are no finite number of potential string values. So yes below formula was useful for few columns which have definite set of string values.

 

I wonder if there is a way. 

tcroberts
12 - Quasar

You could also use REGEX_Match to look specifically for yyyy-mm-dd if you know the date will always be in this format:

 

datetimewithstringsandregex.PNG

Labels