Date&Time Shift

The node shifts a date or time with a defined duration or granularity. The user can select the Date&Time columns to shift and the shift value. The shift value can be achieved by using either a duration column or a numerical column, however, it is also possible to enter a constant shift value (either duration or numerical combined with a granularity). If the shift value is positive, it is added to the selected date. A negative value will be subtracted. A numerical value is interpreted based on the selected granularity (year, month, week, day, hour, minute, second, millisecond, nanosecond).

Options

Column Selection

Column Selector
Only the included columns will be shifted.
Note: A LocalTime can not be shifted by years, months or weeks. A LocalDate can not be shifted by hours, minutes or seconds.

Replace/Append Selection

Append selected columns
The selected columns will be appended to the input table. The suffix of the appended columns can be provided in the text field to the right.
Replace selected columns
The selected columns will be replaced by the new columns.

Use Duration

Duration column
Select to choose the shift value from a duration column.
Duration value
Select to insert a format string to use as constant shift value. The inserted string can be either in
1. the ISO-8601 representation (see date-based duration format or time-based duration format for details), examples below,
2. the short letter representation (e.g. '2y 3M 1d')
Date-based duration: y: years, M: months, d: days
Time-based duration: H: hours, m: minutes, s: seconds
or
3. the long word representation (e.g. '2 years 3 months 1 day').

Examples for ISO-8601 (date-based duration):
  • "P2Y" parses as "+2 years"
  • "P-2Y" parses as "-2 years"
  • "P1Y2M3W4D" parses as "1 year, 2 months, 3 weeks and 4 days"
Examples for ISO-8601 (time-based duration):
  • "PT15M" parses as "+15 minutes"
  • "-PT15M" parses as "-15 minutes"
  • "PT2H15M3.5S" parses as "2 hours, 15 minutes and 3.5 seconds"

Use Numerical

Numerical column
Select to choose the shift value from a numerical column. A positive value will be added to the reference date or time, a negative one subtracted from it.
Numerical value
Select to insert an integer to use as constant shift value. A positive value will be added to the reference date or time, a negative one subtracted from it.
Granularity
The granularity of the numerical value (in years, months, weeks, days, hours, minutes, seconds, milliseconds, nanoseconds).

Input Ports

Icon
Input table.

Output Ports

Icon
Output table with shifted columns.

Popular Predecessors

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.