ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula to add previous month to dataset

CDIns
8 - Asteroid

Looking for a formula that will add the 'Reporting Date' to my dataset. I always complete this task the first week of the following month. So next week during first week of august, I'll need my report to say 7/31/24. 

 

I am currently using the below formula:

 

Datetimeadd(datetimefirstofmonth(),-1,'days')

 

Its giving my the correct reporting date of 06/30/24 however, its also including the time. The time date is formatted as 2024-06-30. 

 

 

Is there anyway to remove the timestamp? and convert the format from 2024-06-30 to 06/30/24? 

 

Thanks in advance, 

 

 

1 REPLY 1
CoG
14 - Magnetar

You can do this quite simply by adding the following function:

 

DateTimeFormat(Datetimeadd(datetimefirstofmonth(),-1,'days'), "%m/%d/%Y")

 

Hope this helps and Happy Solving!

Labels
Top Solution Authors