SUBTRACT_YEARS

Description

SUBTRACT_YEARS takes a date and a number of years to add, and returns a date with the given number of years added.

In the special case that the new year doesn't contain the original date (e.g. when subtracting a year from the leap day 29.02.2016) the new date will have the same number of days from the beginning of the year (e.g. 01.03.2015 in the earlier example).

Example

SUBTRACT_YEARS(now(), 18)

This expression returns the current date 18 years ago.