years_diff
Description
Returns the year difference between two date expressions (expr1
− expr2
), accurate to the year.
Syntax
BIGINT years_diff(DATETIME expr1,DATETIME expr2);
Parameters
-
expr1
: the end time. It must be of the DATETIME or DATE type. -
expr2
: the start time. It must be of the DATETIME or DATE type.