Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.
SOLVED

Differing Date Formats

Highlighted
8 - Asteroid

Brothers and Sisters of Alteryx Community,

 

I have a date Column called "[AMER 4. What is the last day of the accounting period covered by the statutory report date for this assessment?_015344] (as reported)" which has dates in the following 2 formats: YYYY-MM-DD and MM/DD/YYYY.

 

Does anyone here know of a formula that can put all of these into YYYY-MM-DD??

 

Thank in advance!!

Highlighted
Alteryx Partner

Hi @AuditPro13 

 

This is the formula you would want to use:

if contains([Field1], '/')
then DateTimeParse([Field1],'%m/%d/%Y')
else [Field1]
endif

 

Field 1 is just a renamed version of your field name because I could't work with the square brackets. You can use a select tool at the end to rename it back to your column name.

 

Work flow is attached for you : )

 

- Andrew

Labels