Date&Time Difference

Calculates differences between two date&time cells and appends a new column. The output can be either a duration or a selected granularity (years, months, weeks, days, hours, minutes, seconds, millis, nanos). It can be configured to use as second date&time either a second column, the execution date&time, a selected fixed date&time or the date&time contained in the previous row.

Options

Base column

Column Selector
The first date&time column can be chosen.

Calculate difference to

second column
Calculates the difference between the selected second column and the first column. Differences can only be calculated between columns of the same type. Using the Modify Time, Modify Date, and Modify Time Zone nodes you can adjust the date&time formats beforehand. The first column will be subtracted from the second column (second column - first column).
execution date&time
Calculates the difference between the execution date&time and the chosen first column. The first column will be subtracted from the execution date&time (execution date&time - first column).
fixed date&time
Calculates the difference between the chosen fixed date&time and the chosen first column. The first column will be subtracted from the fixed date&time (fixed date&time - first column).
previous row
Calculates the difference between the date&time in row n and row n-1 in the chosen column. The n-1th row will be subtracted from the nth row ( nth row - n-1th row ).

Output options

Granularity
Calculates the difference and outputs it in the chosen granularity (years, months, weeks, days, hours, minutes, seconds, millis, or nanos).
Duration
Calculates the difference and outputs it as either date-based or time-based duration. If the difference between local or zoned date&time columns is calculated, differences of years, months, or days will be converted to hours.
New column name
The name for the new column can be chosen.

Input Ports

Icon
Input table.

Output Ports

Icon
Output table containing an appended column with the calculated differences.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.