Thanq sir, but i need "next_day(' 01-mar-2011','tue') in oracle" these functionality. means this query returns me 08-mar-2011 as the answer. So i need the replacement this function in mysql.
You use the same function but you have to use a variable number for the amount of days you want to add. To do so, you could use an IF to return 1 if it's a Monday and 8 - Weekday() otherwise.
Or you can get tricky and use 8 - (Weekday + (7 - Weekday) \ 7 * 7. Where "\" is integer division.
Comment