Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

DateTimeDiff > x always the same result

df
8 - Asteroid

Hi,

 

i have a problem with this formular:

when the difference between current timestamp and next timestamp  is bigger then 15 minutes it should be flaged with "1"

where is my mistake?

 

grafik.png

5 REPLIES 5
LordNeilLord
15 - Aurora

Hey @df

 

Swap the order of your fields :)

 Datediff.PNG

 

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

MarqueeCrew
20 - Arcturus
20 - Arcturus

I was going another direction:

 

IF DateTimeDiff([Row+1:Timestamp],[Timestamp],"Minutes") > 15
THEN 1
ELSE 0
ENDIF

swap the variables.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
jamielaird
14 - Magnetar

I was about to reply with yet another option - swap the > for <

 

IF DateTimeDiff([Timestamp DateTime],[Row+1:Timestamp DateTime],"minutes") < 15
THEN 1
ELSE 0
ENDIF
LordNeilLord
15 - Aurora

I actual change my mind...but still got it correct!

 

Oh well, you have answers for any way you want to do it :)

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

df
8 - Asteroid

i thought DateTimeDiff(A,B) = DateTimeDiff(B,A) and is always a positive number o:

Labels
Top Solution Authors