Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Converting format of column header date (2023_03) to Mar-23

ysong943
5 - Atom

Hey all, I have a bunch of column headers with dates in the format 2023_03, 2023_04, etc, but I want them to be Mar-23, Apr-23 etc.

 

I tried using the Dynamic Rename Tool and putting in the expression box: DateTimeFormat([_CurrentField_],"%B-%Y") but it does nothing (no changes). 

4 REPLIES 4
Luke_C
17 - Castor
17 - Castor

Hi @ysong943 

 

You'll need to parse the data before formatting it:

DateTimeFormat(DateTimeParse([_CurrentField_],'%Y_%m'),"%b-%Y")

Luke_C_0-1684425660630.png

 

binuacs
21 - Polaris

@ysong943 convert the given column heading into date type using the DateTimeParse function then apply the DateTimeFormat 

 

DateTimeFormat(DateTimeParse([Field],’%Y_%m’),’%b-%y’)

ysong943
5 - Atom

@Luke_C Thank you so much!

ysong943
5 - Atom

@binuacsThank you, I appreciate it!!

Labels
Top Solution Authors