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

string field with dates and other values

mstoler
8 - Asteroid

Hello,

 

I have an Excel file with a column which can either be a single date or date range.

 

As an example 11/1/2019 or 11/1/2019 - 11/3/2019.

 

I notice that for the values with a single date Alteryx is converting this to 2017-11-01 and leaving the other values as is.  Just curious why Alteryx does this on a column that is not a date but a string.

 

Thanks,

 

Michael

3 REPLIES 3
echuong1
Alteryx Alumni (Retired)

Do you have the datatype of the column set to be a Date, rather than a string? You can check this by either adding a Select Tool, or toggling to Metadata in the Results window. 

 

By default, Alteryx shouldn't be changing your values to be a date if they are set to come in as a string. I'm guessing your datatype is being changed to a date somewhere along the way.

 

If you'd like to keep your values as is, and they are being converted to a date for whatever reason, you can use the Datetime tool to convert it to a string.

 

Let me know if this helps!

mstoler
8 - Asteroid

Hello,

 

The values are coming from an Excel file and I can see that if string is a date then Alteryx converts it to its date format yyyy-mm-dd.   I would expect that if the value is a string that it would keep it as a string but I think it might be getting the date from Excel.

 

Michael

 

echuong1
Alteryx Alumni (Retired)

Gotcha. It might be picking up the format from excel and automatically converting it to the Alteryx recognized date format. 

 

In that case, you can use the Datetime tool to convert them back to strings and put them in the format you'd like. 

 

Hope this helps!

Labels