Alteryx Designer Desktop Discussions

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

Time Difference

Alteryx_Geek
8 - Asteroid

I am looking to find the delta between below timestamps (string format)

 

Example 1: 

                   2022-07-01 12:19:15.700
                   2022-07-01 12:19:15.800

 

                   The answer should be 0.1 sec as the output.

 

Example 2: 

                   2022-07-01 12:19:15.700
                   2022-07-01 12:19:20.700

 

                   The answer should be 5.0 sec as the output.

 

 

11 REPLIES 11
OllieClarke
15 - Aurora
15 - Aurora

@Alteryx_Geek I rounded everything to 1dp based on your question, but if you remove the Round(.....,0.1) from the formula then that will no longer be the case:

 

OllieClarke_0-1659716828449.png

 

So:

datetimediff(LEFT([time],19),LEFT([row-1:time],19),'seconds')
+
tonumber(substring([time],19))-tonumber(substring([row-1:time],19))

 

Alteryx_Geek
8 - Asteroid

This is working as expected, thanks @OllieClarke 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels