Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

calculating the date from month and year

Ekta
8 - Asteroid

Dear All,
I have month and year, I need to calculate the date will last day of the month.
Please help me with this.
My data month and year columns are like below and output is the required output
Month | Year | Output
01 |2018 |2018-01-31
02 |2018 |2018-02-28

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor
I think this could work (not around Alteryx now):
DateTimeTrim(ToString([Year])+"-"+ToString([Month])+"-01", "lastofmonth")

Cheers,
grazitti_sapna
17 - Castor

Hi,

Please find the solution attached along with this post.

Thanks.

Sapna Gupta
Thableaus
17 - Castor
17 - Castor
Or
DateTimeAdd(ToDate(DateTimeAdd(ToString([Year])+ToString([Month]) + "-01", 1, "months")), -1, "days")
Ekta
8 - Asteroid

Thank you so much , works perfectly fine

Labels