MySQL: Using DATE_SUB to subtract business days instead of all calendar days I am looking for a robust solution to subtract the number of business days from a date. I am using DATE_SUB however it subtracts all calendar days.

For example, if today is Monday and I subtract 2 days from today, I would like for the result to be Thursday last week and not Saturday.
You can use DAYOFWEEK to calculate the right number of days to subtract based on that. This also works for date_add. For the DAYOFWEEK index, 1 is equal to Sunday and 2 is equal to to Monday.

case 
when DAYOFWEEK({date}) = 1 then date_sub({date}, Interval 2 Day)
when DAYOFWEEK({date}) = 2 then date_sub({date}, Interval 3 Day)
else date_sub({date}, Interval 1 Day)
end


http://www.w3resource.com/mysql/date-and-time-functions/mysql-dayofweek-function.php