Convert DateTime to integer

We have significant issues ordering our data table in the Canvas workpad accordingly to the timestamps.

I explain the full problem here: Link
If this problem is solved then we are happy and we can continue our work.

In order to make the data table only present elements which lie between two dates, we thought to take these steps:

  1. Adjust the ES SQL code so that the preview of the result is what we would like to get
  2. We add an additional column so that timestamp1 and timestamp2 (timestamp1 < timestamp2) are getting numbers which are number1<number2
  3. In the expression editor, we set 'filterColumn' to the column, which we created at step 2

We hope that you understand our request.
We just want to filter our data table according to a given timespan.

With best regards