Timestamp Difference Processor

Modified on Tue, 30 Nov 2021 at 02:34 PM

Overview

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.


Input

The processor requires an input dataset that contains at least two datetime columns.


Configuration

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:


  • Nanoseconds
  • Microseconds
  • Milliseconds
  • Seconds
  • Minutes
  • Hours
  • Days

Output

The Processor returns the original input dataset with an additional column that contains the calculated timestamp differences.


Example

Input

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.



Workflow

In this workflow we use a Custom Input Table to insert the example data into the Timestamp Difference Processor and pass the results to a Result Table.



If the timestamps in the input datasets are not of type datetime, use the Data Type Conversion Processor.

Example Configuration


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.


Result




Related Articles

Timestamp Extraction Processor

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article