community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

calculating the date from month and year

Highlighted
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

Alteryx Certified Partner
Alteryx Certified Partner
I think this could work (not around Alteryx now):
DateTimeTrim(ToString([Year])+"-"+ToString([Month])+"-01", "lastofmonth")

Cheers,
Alteryx Partner

Hi,

Please find the solution attached along with this post.

Thanks.

Alteryx Certified Partner
Alteryx Certified Partner
Or
DateTimeAdd(ToDate(DateTimeAdd(ToString([Year])+ToString([Month]) + "-01", 1, "months")), -1, "days")
Asteroid

Thank you so much , works perfectly fine

Labels