In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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
Top Solution Authors