Start Free Trial

Alteryx Designer Desktop Discussions

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

Duration Accross 2 day

JTCairns
8 - Asteroid

Hi All

 

My brain wont work today, im calcuating duration of certain shifts but i cant remeber how to take into account shifts over 2 days. e.g

 

Arrive           Leave
21:00:00      07:00:00

 

This should be 10 not 14. Anyone got a work around

 

Cheers

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus

Create two calculated fields.

 

 

ArriveNew

 

"2018-01-01 "+[Arrive]

 

LeaveNew

 

if [Leave] > [Arrive] 

then "2018-01-01 "+[Leave]

else "2018-01-02 "+[Arrive]

endif

 

Then do your datediff on these new fields.

 

Ben

JTCairns
8 - Asteroid

Magic!! Cheers @BenMoss

Labels
Top Solution Authors