Re: Datediff help request

From: Armando (blba2k_at_nospamyahoo.com)
Date: 03/08/04


Date: Mon, 8 Mar 2004 17:02:45 -0500


Assuming birthday is a datetime, this may work for you...

select dateadd(yy,datediff(yy,@birthday,getdate()),@birthday)

"1idesigned" <code@1idesigned.com> wrote in message
news:OtgJJ1UBEHA.3776@tk2msftngp13.phx.gbl...
> Hello,
> I need a bit of help with a a datediff statement. I would like to
> replace the year portion of a static month and day in the statement with
> the year portion of a getdate().
>
> My code looks like this
> Datediff("d" [birthday], 11/30/2004) / 365.24
> This give the age, which I would like to then use this to report the
> grade of the student.
> Basically if a student age is between the nov and nov they are grouped
> together in the same grade.
>
> Thanks in advance
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!