Subtract two time strings

Hi guys I have the strings ‘12:02:24’ and ‘12:03:55’ how do I subtract one from the other given that they are currently strings? Thanks.

@cssc - You can try this…below will you the difference in seconds

DateDiff(dateinterval.Second,Convert.todatetime(“12:02:24”),Convert.todatetime(“12:03:55”))

Output:

image

Please find attached a workflow file that will give you an output on Time3 as total seconds and on Time4 will give you a timespan format of the total seconds. Simple put in your two time under Time1 and Time2.
Time_Subtraction.zip (2.3 KB)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.