Alteryx Designer Desktop Discussions

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

creating new date variable from a count variable in dataset

eniafe32
5 - Atom

Hi all,

 

I am new alteryx and i need help with creating a new date variable from another variable which is a count variable. The count variable which is provided in the dataset is from 1 to 41 which is the consecutive months from January 2019 to May 2021( the date data not provided in the dataset). So i want to generate new column which will have 1 = January 2019, 2 = Feb 2019, 3 = Mar 2019, 4 = April 2019 and so on till 41 = May 2021.

 

Thank you and i look forward to getting help with this.

 

 

2 REPLIES 2
ncrlelia
11 - Bolide

Hi @eniafe32,

 

You can use the DateTimeAdd function to create the Date then use the DateTimeFormat function to change the format to your desired format.

Please see below my suggested solution. I have got May 2022 for count = 41 though.

 

ncrlelia_0-1629865678208.png

 

Hope this helps.

 

Cheers,

Lelia

eniafe32
5 - Atom

Thank you @ncrleila. your suggestion worked perfectly!

Labels