Alteryx Designer Desktop Discussions

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

I want a column stating the Last date of the month for a particular date

pranit1997
7 - Meteor

I am new to Alteryx.

 

Eg: If my date is 8/20/2020, My output should come as 08/31/2020.

4 REPLIES 4
lmorrell
11 - Bolide

Hi @pranit1997 

 

Workflow is attached.

 

I want a column stating the Last date of the month for a particular date.png

 

By converting your dates into a date data type, truncating to the first day of the month, adding one month, then finally subtracting one day we can dynamically return the final day of the specified date. The calculation to perform this is below

 

datetimeadd(DateTimeTrim(DateTimeAdd([Date_Date],1,'month'),'month'),-1,'days')

 

Hope this helps! 

pranit1997
7 - Meteor

Thanks a lot

grazitti_sapna
17 - Castor

Hi @pranit1997 , give this a try.

 

Formula-Datetimeformat(Datetimeadd(Datetimetrim(Datetimeadd(Datetimeparse([Date],"%m/%d/%Y"),1,"month"),"month"),-1,"day"),"%m/%d/%Y")

 

grazitti_sapna_0-1602044485708.png

 

Thanks.

 

Sapna Gupta
pranit1997
7 - Meteor

I got the same output as required with this formua also.

 

 

DateTimeTrim([Created Datetime],"lastofmonth")

 

Thanks for your help.

Labels