Alteryx Designer Desktop Discussions

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

Differing Date Formats

AuditPro13
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!!

1 REPLY 1
AndrewBanh
9 - Comet

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