Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Convert String format to Year and Month

FECL3
8 - Asteroid

I am looking to convert string format of "201201" to a Year and month format of "01-2012"

 

Any help would be greatly appreciated

3 REPLIES 3
JosephSerpis
17 - Castor
17 - Castor

Hi @FECL3 I mocked up a workflow that produces the output you describe in a few different ways.

FECL3
8 - Asteroid

Thank you for the response. I want the output in a date format (mm-YYYY) however, when I change the output of the formula to date it does not run as expected. How would I correct this?

JosephSerpis
17 - Castor
17 - Castor

Hi @FECL3 Alteryx only recognises YYYY-MM-DD as a valid date format hence when you change the data type to data in formula tool it does not work. If you want the format mm-YYYY then it will need to be a string field like in the workflow I previously posted. This link explains in more detail Datetime Function in alteryx. If you read the section about Datetime Format it shows that the data types needs to be a string.

 

DateTimeFormat(dt,f): Converts date-time data from ISO format to another specified format (f) for use by another application. Output to a string data type.

Labels
Top Solution Authors