addQuarter function
The addQuarter function adds a given number of quarters to a date attribute.
Parameters
addQuarter(date, nquarter)
Parameter | Description |
---|---|
date | The date attribute we want to add quarters to. The date parameter is mandatory. |
nquarter | The number of quarters to add to the chosen date attribute. The nquarter parameter is mandatory. A quarter is made up of three months. |
Date type valid formats (if the values aren’t this format, the function will return an error).
2019/10/12;
12/10/2019;
2019-10-12;
12-10-2019;
2019/Oct/12;
12/Oct/2019;
2019-Oct-12;
12-Oct-2019.
Example
The following example uses the Bike Sales dataset.
Description | Screenshot |
---|---|
In this example, we want to add two quarters to the Date attribute. We type the following formula in the addquarter attribute:
and the attribute will be filled with the Date attribute’s values postponed by two quarters, that are six months. The results are:
and so on. |