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
13 - Pulsar

@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