_add_years

Returns the timestamp with time zone (as a string) that results from adding "integer_expression" number of years to "string_expression", where "string_expression" represents a timestamp with time zone.

Syntax

_add_years ( string_expression , integer_expression )

Example 1

# _add_years ( '2005-11-01 12:00:00.000-05:00' , -1 ) #

Result

2004-11-01 12:00:00.000000000-05:00

Example 2

# _add_years ( $current_timestamp , 1 ) #

Result

2006-11-01 12:00:00.000000000-05:00

Example 3

# timestampMask ( _add_years ( $current_timestamp , 1 ) ,
 'yyyy-mm-dd' ) #

Result

2006-11-01