Re: Datediff help request
From: Armando (blba2k_at_nospamyahoo.com)
Date: 03/08/04
- Next message: js: "Re: permission problem?"
- Previous message: Sebastian K. Zaklada: "Re: Migrating to new domain"
- In reply to: 1idesigned: "Datediff help request"
- Next in thread: 1idesigned: "Re: Datediff help request"
- Reply: 1idesigned: "Re: Datediff help request"
- Messages sorted by: [ date ] [ thread ]
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!
- Next message: js: "Re: permission problem?"
- Previous message: Sebastian K. Zaklada: "Re: Migrating to new domain"
- In reply to: 1idesigned: "Datediff help request"
- Next in thread: 1idesigned: "Re: Datediff help request"
- Reply: 1idesigned: "Re: Datediff help request"
- Messages sorted by: [ date ] [ thread ]