Free Trial

Alteryx Designer Desktop Discussions

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

How to convert string Month and Year to Dates

Ro2
7 - Meteor

Hi, I'm just trying to combine two string columns together into one date column.

For example:

First column called "Month" is a string column with MAR

Second column called "Year" is also a string with 2024

6 REPLIES 6
alexnajm
18 - Pollux
18 - Pollux

What is your end expected result? For example if you want a Date data type in this case, what would be the day if you were to put these together?

 

Otherwise, you can just use a Formula to do [Month]+" "+[Year]

Ro2
7 - Meteor

I want the output to be Date. That formula does not work for a date output. The day can be 01

Ro2
7 - Meteor

I want the output to be Date. That formula does not work for a date output. The day can be 01

alexnajm
18 - Pollux
18 - Pollux

Correct, it would not because there wasn't a specification about the day - that's why I asked the question!

 

Here is a workflow that would work:

 

DateTimeParse(ToString([Year])+[Month],"%Y%b")

Ro2
7 - Meteor

That works great! Thanks so much for your time.

alexnajm
18 - Pollux
18 - Pollux

Happy to help!

Labels
Top Solution Authors