Alteryx Designer Cloud Discussions

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

how can I create "Month_year" out of "Month_date_year" format?

MahsaM
5 - Atom

Example:

what I have: Jan-16-2021

what I want: Jan-2021

2 REPLIES 2
AMiller_Tri
Alteryx Alumni (Retired)

Hi @Mahsa Mirgholami? , thank you for your question!

 

First, you need to make sure the data type of this column is in the correct date format.

You can access the date\time data types from the data type drop-down of the column:

From there, you're looking for formats that start with "shortMonth" (case sensitive):

You can complete the format to "shortMonth*dd*yyyy" to get only the relevant result.

  • shortMonth - stands for an abbreviated month (as is in your scenario)
  • dd - stands for a 2-digit day.
  • yyyy - stands for a 4-digit year.

 

So now we're working with a recognized date column: (this might've been your starting point if Trifacta had already identified it on its own)

Now, since the format you desire isn't offered as one of the primary date formats - you'll need to insert a custom date format. This can be accessed through the drop-down list of the column:

From there, we put your desired custom format, like so:

  • MMM - abbreviated month.

 

You can then see the change in the date format in the preview to the left:

 

I hope that helps; please feel free to ask any additional questions.

 

Thanks!

Amit.

 

 

 

MahsaM
5 - Atom

Thank you! it was really helpful!