Alteryx Designer Desktop Discussions

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

How to get five year back date

swethav
6 - Meteoroid

I want five years back date for date column yyyymmdd .

Like if I have date as 20230618 I want it as 20180618

 

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @swethav 

 

Here is a workflow for the task.

Formula: change [field1] to column name

 

DateTimeFormat(DateTimeAdd(DateTimeParse([Field1],"%Y%m%d"),-5,"years"),"%Y%m%d")

 

Output:

 

atcodedog05_0-1605813389243.png

 

Workflow:

atcodedog05_0-1605813310480.png

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

swethav
6 - Meteoroid

Thank you . I got it 

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @swethav 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any other issues 🙂

Labels