Find Business Days Between Two Dates in MySQL



With the help of DATEDIFF(expr1, expr2) we can find the business days between two specified dates.

For example, if we want to find business days between ‘2017-05-27’ and ‘2017-05-23’ then following would be MySQL query −

mysql> Select DATEDIFF('2017-05-27','2017-05-23') AS 'Total Business Days';
+----------------------+
| Total Business Days  |
+----------------------+
| 4                    |
+----------------------+
1 row in set (0.00 sec)
Updated on: 2020-01-28T10:00:44+05:30

791 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements