# Sum duration columns

Hello friends : D I hope y’all doing well

So, this time I have a new challenge and I reach the point where I need another point of view, or an advice.

I have a table that looks like this:

d1 - - - - - - d1Duration - d2 - - - - - - - d2Duration

And after some attempts to sort and sum all this durations I got:

d1 - - - - - - d1Duration - d2 - - - - d2Duration - Duration output

My expected output is the sum of the values, but instead this method is substracting.

I´ll appreciate any idea : D

-N

What nodes/method are you using currently?

1 Like

Hi @ArjenEX

I got that result by using “Column Aggregator”

including date&time columns

and using duration method.

-N

1 Like

Could you upload your current workflow (with data) or at least the data?

1 Like

@ttsk8der
Could you convert to number and then use math formula to subtract?
br

1 Like

Hello @rfeigel and @Daniel_Weikert

Sure, there you have a example WK with some data
durExample.knwf (13.3 KB)
sample.xlsx (8.3 KB)

About your solution @Daniel_Weikert I want to explore first if it´s possible to sum. I like the time precision.

If it isn´t possible, be sure I´ll be glad to try this new method.

Try this. Thanks to @gonhaddock for the Column Expressions script. If you absolutely need the milliseconds maybe he can weigh in.

hello @ttsk8der

durExample-new.knwf (27.6 KB)

4 Likes

Hello @rfeigel and @tomljh hope you´re starting the week nice : D

Sadly I haven´t the “Column expression” node because IT restrictions. so, sadly I couldn´t try your solution @rfeigel .

About your solution @tomljh I have to say that is very nice, and implemeting it to my real project it save me an extra step. so I can´t expreess you my gratitude. Thank you.

Thank you all for your time and effort

• N

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