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. 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.
SOLVED

Formula for dynamic dates

HannahSwain7
7 - Meteor

Hi! 

 

I have a data set with a number of columns containing various dates. I want to create a formula which nulls any dates with are more than 3 years old. The workflow will run regularly so the formula needs to be dynamic. How would I do this please?

 

Many thanks,

Hannah

2 REPLIES 2
aatalai
15 - Aurora

@HannahSwain7  try this conditional formula

 

If  [datefield] < datetimeadd(datetimenow(),-3,"year") then null() else [datefield] endif

Deano478
12 - Quasar

Hey @HannahSwain7 can you throw some sample dates in here so we can test on them?

Labels
Top Solution Authors