Date variance
This function varies the input date by the number of days specified as an extra parameter.
If the input date is null, then the function returns the current date.
Option | Description |
---|---|
Extra parameter |
This function requires an extra parameter.
The extra parameter must be a number of days. If the extra parameter is 0 or null or if it is not a number, then the parameter is replaced with 31. For example, if the input date is 05-11-2016, then the generated date is randomly selected between 04-10-2016 (31 days before the input date) and 06-12-2016 (31 days after the input date). |
In the first example, the extra parameter is "0". Then, the function replaces this value with 31. The generated date, 07-07-2018, is randomly selected between 01-06-2018 (31 days before the input date) and 02-08-2018 (31 days after the input date).
In the first example, the extra parameter is "4". The generated date, 01-07-2018, is randomly selected between 29-06-2018 (4 days before the input date) and 06-08-2018 (4 days after the input date).
Input value | Extra parameter | Example of a masked value |
---|---|---|
02-07-2018 | "0" | 07-07-2018 |
02-07-2018 | "4" | 01-07-2018 |