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

Apply Formula on dates and update the new column

Lakshmikanth_2021
8 - Asteroid

I need apply the date formula on column 'Created On' on input file and get the desired 'output' in Alteryx. 

 

Formula: If the 'created on' is in the last 7 days, add a new column and update the rows as Yes. else keep it blank.

2 REPLIES 2
grazitti_sapna
17 - Castor

Hi @Lakshmikanth_2021, try this.

 

if DateTimeDiff(DateTimeToday(),[Created On],'days')>=0 and
DateTimeDiff(DateTimeToday(),[Created On],'days')<=7 then "Yes" else Null() endif

 

grazitti_sapna_0-1656994173047.png

 

I hope this helps!

 

Thanks!

 

Sapna Gupta
binu_acs
21 - Polaris

@Lakshmikanth_2021 similar to @grazitti_sapna solution

IIF(DateTimeDiff(DateTimeToday(),[Created On],'days') <= 7 AND DateTimeDiff(DateTimeToday(),[Created On],'days') >= 0, 'Yes', Null())

binuacs_0-1656996702322.png

 

Labels
Top Solution Authors