Viewing 2 posts - 1 through 2 (of 2 total)
Correction:
select person, birthday
from mytest
where
(datepart(dy, dateadd(mm,@months,@today)) <= datepart(dy, @today) and
(datepart(dy, birthday)>= datepart(dy, @today) or
datepart(dy, birthday)<=datepart(dy, dateadd(mm,@months,@today))))
or
(datepart(dy, dateadd(mm,@months,@today)) >= datepart(dy, @today) and
datepart(dy, birthday) >= datepart(dy, @today) and
datepart(dy,...
November 11, 2003 at 8:25 am
quote:
Here's Another:select person, birthday from mytest
where
datepart(dy, birthday)<=(datepart(dy, dateadd(mm,@months,@today)))
and
((datepart(dy, birthday)>= datepart(dy, @today))
or
datepart(dy, birthday)> (datepart(dy, dateadd(mm,@months,@today))))
November 11, 2003 at 7:30 am
Viewing 2 posts - 1 through 2 (of 2 total)