The Timestamp Difference Processor calculates the difference between two datetime values (located in different columns of the same dataset) and returns the result in an additional column.
The processor requires an input dataset that contains at least two datetime columns.
The configuration of the processor provides the possibility to select the columns from which the difference will be calculated and additional settings for the output format.
The available time units for the time difference output are:
The Processor returns the original input dataset with an additional column that contains the calculated timestamp differences.
As input we just take a small dataset with the columns "Id", "Timestamp1" and "Timestamp2". In this example we want to know the difference between the two timestamps for each row.
If the timestamps in the input datasets are not of type datetime, use the Data Type Conversion Processor.
This configuration defines, that the values of the "Timestamp1" column will be subtracted from the values of the "Timestamp2" column to get the time differences. The selected unit for the results is "Hours", and for the new column name the default is used.