In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

make today's date with the specified date

Ar13f
10 - Fireball

Dear All,

 

if I change the date as in the output column taken from the next column, what is the formula? (the year changes to 2021 but the month and date are the same)

 

Date InvoiceOutput
2002-08-292021-08-09
2008-10-092021-10-09
2010-11-202021-11-20

 

I tried to construct the year, but I couldn't figure out how to add the month and day. Perhaps you have a better formula than I do. Thank you in advance.

 

Years-Test.png

2 REPLIES 2
danilang
19 - Altair
19 - Altair

Hi @Ar13f 

 

You can use ToString(DatetimeYear(DateTimeToday()))+Substring([Date Invoice],4).  Just watch out for leap years.  2008-02-29 is a valid date, but 2021-02-29 isn't.  You'll have to decide what to do in these cases.

 

Dan

Ar13f
10 - Fireball

Dear @danilang 

 

I hope you and family in good health ...

 

thank you for your advice .... 

 

 

regards,

Arief

Labels
Top Solution Authors