Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: When's Your Anniversary

    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,...

  • RE: When's Your Anniversary

    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))))


Viewing 2 posts - 1 through 2 (of 2 total)