community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

Export date to Excel in custom format (yyyy-mm-dd;@)

Hi, I would like to know if it is possible to export date from Alteryx to Excel in specific custom format (yyyy-mm-dd;@).

 

Would be appreciated for any help. 

 

Thanks in advance!

Alteryx Certified Partner
Alteryx Certified Partner

Hi @Ulyana_22 

                           You can if the date field is in string format otherwise if it's an date field excel will auto format the date field. This example highlight what I means I went with a generic date format for the excel format.

 

I find this link helpful to select custom date formats.

Unfortunately that is now working as in output file (Excel) I expect to get data exactly in format yyyy-mm-dd;@

Fireball

You might have to parse it yourself with a formula block.

 

Convert the datetime variable to string, then pick it apart and rearrange it with string functions.

 

So alteryx = yyyy-mm-dd hh:mm:ss

 

your year would be Left([string],4)

month = substring([string],findstring([string],"-")+1,2)

etc

 

then you'd put it back together in whatever format you'd like.

 

It's not pretty, but I've done it enough times that I really should make a macro for it. Just be careful about any single digit dates that may or may not have leading zeros.

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @Ulyana_22 

                           Have updated my workflow if this is not the correct format could please share an example?

Thanks for your help!

 

But we need to get output data in Excel in specific format like in attached file. I wonder if it's possible at all. 

Alteryx Certified Partner
Alteryx Certified Partner

Hi yes is should be possible in the DateTime configuration you can enter a custom format. 

 

Datetime_Config.PNG

Labels