weeks_diff
description
Syntax:
INT weeks_diff(DATETIME enddate, DATETIME startdate)
This function calculates the number of weeks between the startdate and the enddate.
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