We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to modify a date from a value

Maricela17
5 - Atom

Hello team
I need your help... I have a formula that tells me the last day of each month, but I need to create another column that tells me that if the month ends on the 31st, subtract a day and leave the 30th. That is, I need every month to end on the 30th.

Thank you

6 REPLIES 6
Pilsner
13 - Pulsar

Hello @Maricela17 

If you are looking to create a column called end of month, which contains 30th of each month, you could use the following logic.

Screenshot 2025-05-15 164950.png



This takes the year and month from the date column, then appends a "-30" onto the end, forcing the date to be the 30th of the month. 

I have attached the workflow below. Please let me know if this achieves the output you expected.

Regards - Pilsner

binuacs
21 - Polaris

@Maricela17 one way of doing this

image.png

Maricela17
5 - Atom

Hello, thank you very much.

What I really need is, for example, if the "Days" column ends on the 31st, subtract one day so that the final date is 30. If it doesn't end on the 31st, leave the original date.

 

Thank you so much

 

binuacs
21 - Polaris

@Maricela17 update the formula like below

image.png

Pilsner
13 - Pulsar

Hello @Maricela17 

Here is a revised version, which should only change dates that are actually on the 31st.

New.png




Maricela17
5 - Atom

It worked perfectly, thank you very much.

Labels
Top Solution Authors