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

Output Data Tool - Date as Column Header

ckeihn
6 - Meteoroid

I am trying to output data to an excel spreadsheet and for some reason the output tool is exporting the date column headers as Strings.  Is there a way to have Alteryx keep the headers as dates?

2 REPLIES 2
NicoleJohnson
ACE Emeritus
ACE Emeritus

What do your date columns look like when you export? Are they formatted as "2017_08_21" or as "2017-08-21"?

 

If the situation is the former (which would be common since Alteryx likes to replace special characters with _ underscore when tools like Cross-Tab are used), then you can use a ReplaceChar() formula in the Dynamic Rename tool to replace the _ underscores with a - dash or a / slash before exporting, at which point your dates should come across in the right format as column headers.

 

Let us know if that works? If not, samples of your data/workflow, or at least screen shots of what you're seeing, should help us better troubleshoot... thanks!

 

NJ

ckeihn
6 - Meteoroid

I used the following formula to fix the header: DateTimeFormat([MyDate],"%m/%d/%Y").  Originally I had a lower case %y which exported the date with a year with 2 digits.  And as per your suggestion I also have a formula that replaces the underscores: REGEX_Replace([MyDate], '[-\s]', '_').

 

Thank you so much for your help NicoleJohnson!

Labels