I have a table with a time column with this format: m/d/y h:m:s
I would like to create a new column called CumTimeSec that will show the cumulative time difference up to that row.
For example,
Time
| Time | CumTimeSec |
5/11/2022 5:30:03 PM | 0 |
5/11/2022 5:30:08 PM | 5 |
| 5/11/2022 5:30:20 PM | 17 |
| 5/11/2022 5:30:23 PM | 20 |
I figured I could use this code to calculate the difference between each row, but I'm not sure how to sum the values
dt << New Column( "CumTimeSec",
Numeric,
"Continuous",
formula( :Time - Lag( :Time) )
);