Declaration
PERIOD_DIFF(p1, p2)
Description
Returns the interval between two dates in months. The date must contain only year and month information, in the format YYYYMM or YYMM.
Examples
obclient> SELECT PERIOD_DIFF(200802, 200703);
+----------------------------+
| PERIOD_DIFF(200802,200703) |
+----------------------------+
| 11 |
+----------------------------+
1 row in set