Applies to:  CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6 

Description

ADD_YEARS adds a given number of years to a given date.

Supported input column types: base_column -> DATE, years_column -> INT

Output column type: DATE

Syntax

ADD_YEARS ( table.base_column, table.years_column )

Null handling

NULL-values: If any parameter is NULL, the result is NULL

Example


[1] Simple example for ADD_YEARS.

Query
Column1
ADD_YEARS ( "Table1"."Base_Column", "Table1"."Year_Column" )
Input
Table1
Base_Column : DATEYear_Column : INT
Mon Jan 01 2018 00:00:00.000
1
Mon Jan 01 2018 00:00:00.000
0
Mon Jan 01 2018 00:00:00.000
-1
Output
Result
Column1 : DATE
Tue Jan 01 2019 00:00:00.000
Mon Jan 01 2018 00:00:00.000
Sun Jan 01 2017 00:00:00.000


  • No labels