top of page
CerebroSQL

PERIOD_DIFF

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Syntax:
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. Note that the period arguments
P1 and P2 are not date values.

URL: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html

Example

mysql> SELECT PERIOD_DIFF(200802,200703);
-> 11

bottom of page