Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Trying to Create a formula

TP1
5 - Atom

Have two Effective Date's from two different systems both Joined by a Unique Identifier. When I enter the effective date in one system it jumps a day ahead for example - in the Request the effective date would be the 30/09/2018 so when I enter that into our system the effective date would show as the 01/10/2018. happens automatically in Background!

 

I'm looking to create an IF Statement to say that If Effective Date = Effective Date +1(From other System) Then 1 ELSE 0 ENDIF but I'm quite new so having difficulty creating the formula.

 

Thanks for help.

2 REPLIES 2
danilang
19 - Altair
19 - Altair

Hi @TP1

 

The specific function you're looking for is DateTimeDiff.  this gives you the difference between 2 datetimes in the units you specify

 

Formula.png

 

After re-reading your post, I think I may have mixed up the 2 dates.  If that's the case then change the formula to 

 

iF datetimediff([EffDateOtherSystem],[EffDate],"days")=-1 then
	1
else
	0
endif

"=1" changed to ="-1", or change the order of the date fields in the formula.

 

Dan

TP1
5 - Atom

Thanks a million for your help!

Labels