Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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