How to Check the Difference in Hours Between Timestamps

Reported for version 9

In order to calculate the difference in hours between given dates, you can use the dateDiff function in the Column Assigner step. Note that you need to set a "correct" last argument to get the difference in hours. For hours, HOUR should be used.

To check the difference in hours, follow the steps below:

  1. Use your source data with the given dates (timestamps) as an input;
  2. Add the Column Assigner step to your plan and connect the input to it;
  3. Double click on the Column Assigner step;
  4. To get the time difference use the following expression:

    dateDiff(startDate,endDate,"HOUR")
  5. To get the time difference, which is more than fourteen hours, use the following expression:

    iif ( abs(dateDiff(startDate,endDate,"HOUR")) >= 14, TRUE, FALSE)
  6. Specify the output file.

  7. Run the plan.

For details, you can refer to the screenshots: