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.

Convert Date

nmotiani
7 - Meteor

How can I convert the field for date from MM-DD-YY to MMMYY

 

For example Date = 12/1/23

Desired Output = Dec23

 

and then I would like to combine different fields to create a unique identifier such as 

 

Fruit = Apple

Account Number = 1234

Date = Dec23

 

Desired Output = Apple_1234_Dec23

Would appreciate your help thank you

5 REPLIES 5
alexnajm
18 - Pollux
18 - Pollux

DateTimeFormat(DatetimeParse([Date], "%m/%d/%y"), "%b%y")

 

Then you can add them together as you need: [Fruit]+"_"+[Account Number]+"_"+[Date]

binuacs
21 - Polaris

@nmotiani one way of doing this

image.png

nmotiani
7 - Meteor

Im not sure why my formula is breaking and it only shows the first two components but not the date

 

my mistake the date originally shows like 12-01-23 is that whats causing the issue

alexnajm
18 - Pollux
18 - Pollux

first, your Date field needs a bracket at the beginning and end - like this: [Date]

 

second, yes that does change things - it would be "%m-%d-%y" if it's month first.

nmotiani
7 - Meteor

This worked thank you so much appreciate it

Labels
Top Solution Authors