WEEKS_DIFF
weeks_diffβ
descriptionβ
Syntaxβ
INT weeks_diff(DATETIME enddate, DATETIME startdate)
The difference between the start time and the end time is weeks
exampleβ
mysql> select weeks_diff('2020-12-25','2020-10-25');
+----------------------------------------------------------+
| weeks_diff('2020-12-25 00:00:00', '2020-10-25 00:00:00') |
+----------------------------------------------------------+
| 8 |
+----------------------------------------------------------+
keywordsβ
weeks_diff