Moves a date by a specified amount of time in a given direction and writes the results to a target column.
A date can only be moved by an amount of time, the unit of which is the same as or less accurate than the unit of the date itself. If the format of the moving period is more accurate than the format of the source date, the source date is retained. If you move a date by quarters, it is moved by three months for every quarter.
If a date accurate to the nearest day with a number of days > 28 is moved to a month that has fewer days, the result is the last day of the target month.
For example, you can move a date accurate to the nearest month by months, quarters or years, but not by days. A date accurate to the nearest year can only be moved by years, a date accurate to the smallest unit by any unit.
The following parameters are available.
Action |
Result |
---|---|
Source column |
Name of the source column whose date values are moved. Source: Source table Data type: Date Specification: Mandatory |
Direction |
Direction in which the date is moved. Valid values: Forward or Backward Data type: Text Default value: Forward Specification: Mandatory |
Value |
Value by which the date is moved by the selected unit. Source: Manual entry, single value or source table Data type: Number Default value: 1 Specification: Optional |
Unit |
Unit of time by which the date is moved. Data type: Text Default value: Second Specification: As source The information As source allows a move even if the unit of the date values is unknown at the time of creation or if it can vary. |
Target column |
Name of the target column to which the result is written. Data type: Date Default value: Result_1 Specification: Optional The target column can be identical to the source column. The values in the target column are overwritten. |
Example
Source value |
Value |
Unit |
Direction |
Result |
2009-12-24T16:23 |
10 |
YEAR |
Forward |
2019-12-24T16:23 |
2009-12-24 |
10 |
DAY |
Forward |
2010-01-03 |
2009-12-30 |
10 |
MONTH |
Backward |
2009-02-28 |
2009-11 |
1 |
QUARTER |
Forward |
2010-02 |
2009-11 |
1 |
DAY |
Forward |
2009-11 |
2009-01-01 |
3 |
As source |
Forward |
2011-01-04 |
2011-Q1 |
3 |
As source |
Forward |
2011-Q4 |