Home Forums SQL Server 2005 SQL Server Newbies Birthdays in next 7 days RE: Birthdays in next 7 days
steveb.
SSC-Forever
Points: 46733
More actions
September 3, 2010 at 5:55 am
#1216106
try using datediff to get the number of days between @start and the birthday
If it is between 0 and 7incl then their birthday is in the next 7 days
Where DATEDIFF(dd,@start ,dob) > 0 and
DATEDIFF(dd,@start ,dob) <=7