SQLTeam.com | Weblogs | Forums

Next date of same day


I being develop shcool class system. The system is creating lesson schedule. For a schedule lesson having same days for a month. For example for math on tuesday will be same for next week. My problem is how do i make or what sql script to know what is next date of next tuesday of the schedule. So the information can display and says the schedule of math is on tuesday at 1 march 16,5 march 16, 20 march 16 and so on. Please help thx


just + 7 days will give you the next week's date of same day

1 March 2016 is Tuesday, so next Tues date is DATEADD ( DAY , 7, '2016-03-01' )