Hi all,
I have started using JSL and is currently on a beginner level.
My data consists of time-series batch data for different process variables. Each batch has a different time series range/ processing time. Data resolution is 1 hr.
First, I want to convert the batch start time (Real-time) into duration time starting at time point zero (0) and then accumulate to the end Real-time. I think I manage to do that using a script that I found online. However, this only works for the first batch.
For the second batch, the Real-time conversion into duration time does not start at time point zero.
Question: How can I make/modify the script, so it takes into consideration for each batch ID and the respective processing time?
Thanks in advance
SCRIPT
names default to here (1);
dt = current data table ();
dt << New Column( "Duration",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
If( Row() == 1, 0, :TimeStamp - :TimeStamp[1] ) / 60
)
);