PERIOD_DIFF(P1,P2) returns the number of months between periods P1 and P2. : PERIOD_DIFF : Date Time Functions MySQL TUTORIALS


MySQL TUTORIALS » Date Time Functions » PERIOD_DIFF »

 

PERIOD_DIFF(P1,P2) returns the number of months between periods P1 and P2.


P1 and P2 should be in the format YYMM or YYYYMM.

The period arguments P1 and P2 are not date values.

mysql>
mysql> SELECT PERIOD_DIFF(9803,199803);
+--------------------------+
| PERIOD_DIFF(9803,199803|
+--------------------------+
|                        |
+--------------------------+
row in set (0.00 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Date Time Functions
» PERIOD_DIFF