Skip to main content
16-Pearl
October 5, 2018
Solved

Elapsed time.

  • October 5, 2018
  • 1 reply
  • 1069 views
Hi folks,

How to show/calculate time between first and last row in Data Table.
Best answer by CarlesColl

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...

1 reply

1-Visitor
October 6, 2018

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...