cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Elapsed time.

Gucio
14-Alexandrite

Elapsed time.

Hi folks,

How to show/calculate time between first and last row in Data Table.
Krzysztof
1 ACCEPTED SOLUTION

Accepted Solutions

DataTable or InfoTable?

 

Infotable:

var timeBetween = dateDifference(yourInfotable.rows[0][timestampField],yourInfotable.rows[yourInfotable.rows.length-1][timestampField]);

DataTable:

var yourInfotable = yourDataTable.GetGetDataTableEntries({ maxItems: 1000000 });
// -- Here the previous code, you may need to sort the yourInfotable by timestampField...

View solution in original post

1 REPLY 1

DataTable or InfoTable?

 

Infotable:

var timeBetween = dateDifference(yourInfotable.rows[0][timestampField],yourInfotable.rows[yourInfotable.rows.length-1][timestampField]);

DataTable:

var yourInfotable = yourDataTable.GetGetDataTableEntries({ maxItems: 1000000 });
// -- Here the previous code, you may need to sort the yourInfotable by timestampField...
Top Tags