ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
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

 

binu_acs
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