Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.

Date time Difference from a range of times

7 - Meteor


Having a difficult time working this, what i am trying to do is whenever there are a range of workdates i want to take the first date/time and last date/time and find the time elapsed between the two. So with the data below i basically want it to for each workdate give me the time elapsed between the first and last value. Is there an easy way to do this?

8/26/2019 6:398/26/2019
8/26/2019 10:348/26/2019
8/26/2019 16:188/26/2019
8/27/2019 6:228/27/2019
8/27/2019 15:138/27/2019
8/27/2019 16:118/27/2019
16 - Nebula
16 - Nebula

You can use a summarise tool to get the min and max date/time for each Workdate


Then you can use a formula tool to compute the difference in which ever unit you wish.


A quick sample is attached.


Hopefully enough to get you started

14 - Magnetar

Hi @krishnagandhi,


yes there its! You could use the Summarize Tool and a Formula Tool to achieve this and here is how:




What happens:

- First we convert the Date to actual DateTime and Date data type using two DateTime-Tools

- Select to remove the original column

- Summarize to Group by Date and get First and last of every Date




- Formula Tool in the end to calculate the difference:



You'll probably choose something else, but I went with seconds



Workflow is attached. Let me know if this works for you