SOLVED
DateTime Calculation
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
tessaenns
9 - Comet
‎02-06-2020
06:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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! 🙂
Solved! Go to Solution.
Labels:
- Labels:
- Date Time
2 REPLIES 2
20 - Arcturus
‎02-06-2020
06:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
‎02-06-2020
06:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks, Mark - that worked!
