You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
ADD PERIOD TO DATE
Calculates a new date by adding a specified period to a specified date.
Syntax
date + number period
Inputs
- date - The date that you want to add the specified period to.
- number - Specifies how may periods you want to add to the date.
- period - A keyword that specifies which time unit to add. Valid units are DAYS, WEEKS, MONTHS and YEARS.
If you prefer a functional syntax, you can use the INCREMENT_period functions. For example: INCREMENT_DAYS(02-01-2015 , 1 ) = 02-01-2015
Return type
- date
Examples
Expression | Alternative syntax | Result | Type |
---|---|---|---|
DATE("2015-01-01") + 1 DAYS | INCREMENT_DAYS( DATE("2015-01-01") , 1 ) | 2015-01-02 | Date |
DATE("2015-01-01") + 1 WEEKS | INCREMENT_WEEKS( DATE("2015-01-01") , 1 ) | 2015-01-08 | Date |
DATE("2015-01-01") + 1 MONTHS | INCREMENT_MONTHS( DATE("2015-01-01") , 1 ) | 2015-02-01 | Date |
DATE("2015-01-01") + 1 YEARS | INCREMENT_YEARS( DATE("2015-01-01") , 1 ) | 2016-01-01 | Date |
Overview
Content Tools