ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. 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

Determining the "new" year from a pre-determined date

ptopkis
6 - Meteoroid

For a project, I need to determine what year training was completed. However, the year starts on May 11th instead of on a quarter or year. 

 

In Excel it is simple as IF(Date_Completed>Date_Year_Started, Year_Started, "").  

Example: IF(2017-06-01>2017-05-11, 2017, ""). The dates could be the numeric version instead of the actual dates.

 

I tried using Formula to build the IF statement (using Alteryx IF statement) and kept getting malformed IF statement errors.

 

So any ideas on how to do this?

 

Thank you

 

 

 

2 REPLIES 2
nick_ceneviva
11 - Bolide

The Alteryx equivalent of the if statement that you use in Excel would be the following if your dates are formatted as DateTime

 

IF DateTimeDiff([Date_Completed], [Date_Year_Started],"days")>0 THEN [Year_Started] ELSE "" ENDIF

ptopkis
6 - Meteoroid

That work. Thanks!

Labels
Top Solution Authors