In this post,I’ll show yo How to List students whose birth date is in next week.
SQL Query:
1 2 3 4 5 |
Select * from students where datepart(dy,birthdate) between datepart(dy,dateadd(dd,1,getdate())) and datepart(dy,dateadd(dd,7,getdate())) order by month(birthdate),day(birthdate) |
Result: