We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Change date format of Multiple Fields from YYYY-MM-DD to DD-MM-YY

DataPirate26
10 - Fireball

Can somebody assist me to create a single Formula that will change Multiple Fields date format from "YYYY-MM-DD" to DD-MM-YY. I don't want to use datetime tool as I have 7 date fields which needs to be converted to this same format. 

8 REPLIES 8
DataNath
17 - Castor
17 - Castor

If you use a multi-field formula, you can just tick the fields you want to apply this change to and use the following:

 

datetimeformat([_currentfield_], ‘%d-%m-%Y’)

DataPirate26
10 - Fireball

I am getting this below error. All the fields are in date format already. Just need to change it to DD-MM-YY

DataNath
17 - Castor
17 - Castor

The incoming fields need to be in string format so if they aren’t, you can wrap them in tostring():

 

DateTimeFormat(ToString([_CurrentField_]), ‘%d-%m-%Y’)

 

If not, maybe just add a select tool before the Multi-Field and make the target fields string data types first.

Qiu
21 - Polaris
21 - Polaris

@DataPirate26 
We can do it either by a Transpose and CrossTab or with a Multi-Field Formula for this kind of situation.

Below is a quick sample.

0607-DataPirate26.PNG

DataPirate26
10 - Fireball

@Qiu That worked perfectly. Thanx a lot. 

messi007
15 - Aurora
15 - Aurora

@DataPirate26 ,

 

You forgot to check change datatype to string. That's why you have the error.

 

messi007_0-1654588741469.png

 

Hope this helps!

Regards,

DataPirate26
10 - Fireball

Tried this too and it worked. Thank you 

DataPirate26
10 - Fireball

@messi007 Right I forgot to change the data type to string thats why was getting the error. Thanx 

Labels
Top Solution Authors