Alteryx Designer Desktop Discussions

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

Updating table and adding a month label

Milutin
6 - Meteoroid

Hi everyone,

 

I have a table in excel that will be updated every month. I would like to add a new column called Month and every time the table is updated it should put the name of the month in which the data was added.

 

It may sound easy, but I am only a beginner in Alteryx, so any kind of help is welcome.

 

Thanks in advance.

 

 

Regards,

Milos

 

 

6 REPLIES 6
LordNeilLord
15 - Aurora

Hey @Milutin 

 

Have a look at this page, it contains everything you need to know:

 

https://help.alteryx.com/10.1/Reference/DateTimeFunctions.htm

Milutin
6 - Meteoroid

I am sorry, but I still don't get it. Should I add a field using Formula Tool, and then use DateTime functions?

 

 

 

 

 

 

 

 

JulioMO
9 - Comet

Hi @Milutin 

 

Could you please share a sample of what your input data is and what your desired output is? I don't quite get what you want and this will allow me to better help you!

 

Thanks!

danilang
19 - Altair
19 - Altair

Hi @Milutin 

 

That's exactly what you'd do 

 

W.png

 

Use a Formula tool to add a new column into your dataset.  The formula I used is 

 

DateTimeFormat(DateTimeNow(),"%b-%Y")

 

This statement uses DateTimeFormat which can extract the various parts of a date, to extract the month and year "%b-%Y" from the current date DateTimeNow() and puts the results in a new column called CurMonth, giving you...

 

 r.png

 

Use the link that the inestimable @LordNeilLord provided to find out what the "%b" and "%Y" represents as well as look into the various date time functions and format options.

 

You might also want to spend some time in the Academy to get a handle on the Alteryx basics. 

 

Dan

 

 

Milutin
6 - Meteoroid

 

 

Thanks a lot , that is exactly what I needed. Just one more question, can I add month retroactively, for example July and August?

 

Thanks also for recommending me the academy.

danilang
19 - Altair
19 - Altair

Hi @Milutin 

 

You can use the DateTimeAdd() function(check the DateTime section of this page) to add or subtract months from the current date.  If you have a date, DateTimeTrim([DateField],"firstofmonth") will give you the first of that month.

 

Dan

Labels