Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More

to add last day of the month in date with month and year


Dear all, 

Please help me the workflow for calculating the last date of the month , if input is 

2018-03 and required output is the last 30/03/2018

Please help me with this.

Best regards

Alteryx Partner

Hi @Ekta ,

Please find the solution below for your problem.



Thank you so much,

how can we convert this date into the date format?

201809 2018-09-30


thank you in advance

Alteryx Certified Partner
Alteryx Certified Partner

@Ekta ,


i wrote about dates once or twice. Here's an article about Dates that you might find helpful. 


You will need to convert the string into a date format that Alteryx understands. It will become the first of the month. Then you'll add 1 month. Next you'll subtract 1 day. Now you're working with a date that's the end of the month with the right number of days. 


If you want a specific format of the date, you'll need to format the date as a string. 


Open that hyperlink and get more help there. 





Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.

Hi @Ekta 


An alternative to adding a month and subtracting a day to use DateTimeTrim([DateField],"lastofmonth"). This returns a DateTime value one second before the end of the month.  If you need this converted from a DateTime to a Date use ToDate(DateTimeTrim([DateField],"lastofmonth"))