How to find the difference of values ​​in a row?

How to find the difference of values ​​in a row?

slateslate Posts: 1Questions: 0Answers: 0
edited December 2020 in Free community support

( "columns": [
{ "data": "start_date" },
{ "data": "end_date" },
{ defaultContent: "?" },
])

I'm getting a table from the server side

and I want to find the difference in the value of the row and display it in the 3rd column.

How do I express the difference in dates in rows 1 and 2

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    You would get the values with cell().data(), and then use Moment.js to do the calculations - it's excellent for all time/date based operations.

    Colin

This discussion has been closed.