Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Cannot re-use columns with DateTimeFormat ?

Scott_Snowman
10 - Fireball

I have a workflow that analyzes dates input as strings, and I'd like to output them as dates.

 

The DateTime tool in the Parse section works well, but it outputs as ISO format (YYYY-MM-DD). The consumers of the output have asked for "American" output, MM-DD-YYYY.

 

This is simple enough, with a Formula tool and the DateTimeFormat function. However, if I use this, I apparently cannot "re-use" the same field name as the output from the DateTime tool. When attempting to do so, I get an error saying that it is an invalid date.

 

See attached workflow for a very simple example. Am I missing something, or is this a potential bug? I would prefer not to add additional columns of data in the workflow, and this issue appears to require two additional columns (one from the DateTime tool, and then another to actually be able to store the reformatted output of the DateTime tool).

4 REPLIES 4
cmcclellan
13 - Pulsar

In Alteryx, a date will always be YYYY-MM-DD, if you want it in American format it would have to be a string and not a date.

 

So that does mean 1 more column, but you'd remove the (proper) date field as well so the consumers wouldn't see a change at all right ?

Scott_Snowman
10 - Fireball
Ah, got it. I am constrained because the underlying format is a Date, and Alteryx won't cast to string.

And you're right, I will just unselect the columns from the output. It's more about having the columns in intermediate tools, but unselecting them immediately will help with that.

Thank you!
cmcclellan
13 - Pulsar

This should help :)

 

2018-02-13 14_02_38-Clipboard.png

Scott_Snowman
10 - Fireball

Ah, I did not know that DateTimeParse works with strings! This will make things a lot easier.

Labels