SOLVED
Subtract two dates based on criteria in a specified field
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
ZoeM
8 - Asteroid
‎10-15-2019
01:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Community,
Happy Tuesday.
I want to subtract two dates based on the results of a third field.
If the status is closed, then subtract Start Date from End Date.
All other statuses, subtract Start Date from Today().
Please see sample data.
Thanks!
Solved! Go to Solution.
Labels:
- Labels:
- Date Time
3 REPLIES 3
Alteryx
‎10-15-2019
01:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
IF [status] = "closed"
THEN datetimediff([End Date], [Start Date], "days")
ELSE datetimediff(DateTimeNow(), [Start Date], "days")
ENDIF
rfoster7
11 - Bolide
‎10-15-2019
01:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
if [status] = "Closed"
then datetimediff([end],[start],'days')
else datetimediff(DateTimeToday(),[start],'days')
endif
Alteryx
‎10-15-2019
01:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
