Hi all. I've just registered to this forum because I've been searching for days now, and while often getting close, I couldn't really resolve the issue I#m dealing with.
I've got a table with two DATETIME values in each row. What I'd like to do is, is crafting a query that calculates the TIMEDIFF between the two dates, but only the elapsed time within business hours, e.g. between 08:00 and 17:00. Furthermore Saturday and Sunday need to be excluded.
The closest I've come is with a PHP script, but I would like to do it in MySQL.
How do I go best ahead with this ?
Any help is greatly appreciated. Cheers.