ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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
16 - Nebula
16 - Nebula

@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 

Labels
Top Solution Authors