In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

DateTime Calculation

tessaenns
9 - Comet

I need to find the median time between a checkin and a checkout time, each is a date time field. Please advise best practices, thank you! 🙂

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

@tessaenns ,

 

You can use 2 formulas or nest them together.  I'll show you both:

 

 

Seconds_Diff (INT16):
DateTimeDiff([Time of Checkout],[Time of Checkin],"seconds")

Median_Time  (DATETIME):
DateTimeAdd([Time of Checkin],[seconds_diff]/2,"seconds")


Median_Time (DATETIME) as 1 formula:
DateTimeAdd([Time of Checkin],ToNumber(DateTimeDiff([Time of Checkout],[Time of Checkin],"seconds"))/2,"seconds")

or?

DateTimeAdd([Time of Checkin],DateTimeDiff([Time of Checkout],[Time of Checkin],"seconds")/2,"seconds")

 

 

Time functions in Alteryx require more reference or practice.  Please don't be discouraged about having questions about space and time.  Einstein pondered these subjects for years.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
tessaenns
9 - Comet

Thanks, Mark - that worked!

Labels
Top Solution Authors