This function returns the number of years between two date values.
- If a timestamp is entered, only the date contained therein is applied for the computation.
- If the months and days are identical, the result is an integer.
- If the first date value is earlier than the second date value, the result is negative.
- For data type TIMESTAMP WITH LOCAL TIME ZONE this function is calculated within the session time zone.