Duration sum based on ID

Hi everyone.

I have a table with employee data, with the start & end date of their previous jobs. Because there could be gaps between employments, each job duration has to be calculated separately. I calculated the difference in days (with the Date & Time Difference node), then grouped by the User ID to get the sum of Time in position. I also tried to calculate the duration in Y, M, D (with the dame Date & Time Difference node), but then I got stuck on how do you sum up 2 or more durations based on a unique identifier.

image

Ideally I would need the sum result grouped by the User ID in the Y, M, D format, but I was not able to get there.

Does anyone have any ideas?
Thank you very much.
Diana

Hi,
It is not super straight-forward, but what you can do is append a ā€œdā€ to the Time in position using a String Manipulation node (expression: join($Time in position (in days)$, "d")) and then use a String to Duration, Extract Duration Fields, and finally another String Manipulation for putting it all together in the format you want.
Kind regards,
Alexander

2 Likes

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