I am not experienced so much in scripting,
I have table with "Start time", Finish time" and "Working time" columns.
For each row working time is calculated separately and then here is my Formcalc for total time
var t_t = 0
if (Table1.Row[*].Working_time > 0) then
t_t = (Sum(Table1.Row[*].Working_time))
Total_time = Concat(t_t, " h")
Total_time = ""