Let's look at an example to demonstrate how to apply a date operation with the Calculator step. In this case, we have a list of dates. For each date, we want the matching date to be a week before, that is, our date minus seven days.
If you explore the Calculator options, there is no function to subtract dates, but there is one to add dates. So, the trick is to add a negative number. Let's proceed:
- Create a new Transformation and add a Data Grid step.
- Use the Data Grid to define a new field of Date type and populate the grid with some random values.
- After the Data Grid, add a Calculator step. We will use it ...