Just to add to this, and better explain what I am trying to do; I need to add x amount of working hours to a DATETIME, where the working hours are between 08 and 18 on weekdays.
The code below is almost exactly what i need to solve the problem, but it is for adding working days not hours.Obviously this can be changed to add weekday hours by changing DATE_ADD from DAY to HOUR, but that will count 24 hours per weekday rather than using the intervals I need it to.Click Here For CODEI've toyed around with combining parts of the above and this function (from my first post), but i can't seem to get the right combination.If anyone has any ideas I'd love to hear them!