aa>
Sun Jan 04 14:39:20 CST 2004
The thing described there is quite complecated, even takes leap years into
account.
In practice, when asking a person's age one expect to be given number of
full years.
Cannot this be done by converting the two dates to strings, chopping off dd
and mm, convert the rest yyyy to number and see the difference?
To increase the precision same might be done on mm
?
"Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
news:%23wn8eSt0DHA.2752@TK2MSFTNGP09.phx.gbl...
> You should perform the calculation in the database (the database knows the
> current date also).
>
> Here are both VBScript and database methods:
>
http://www.aspfaq.com/2233
>
> --
> Aaron Bertrand
> SQL Server MVP
>
http://www.aspfaq.com/
>
>
>
>
> "Gav" <gav1290@ntlworld.com> wrote in message
> news:DBVJb.916$uy5.793@newsfep1-gui.server.ntli.net...
> > I have a database with date of births stored dd/mm/yyyy (english dating
> > system) and =date() returns a date in the same format in my server.
> >
> > how do i find the persons age using these two pieces of date.
> >
> > thanks
> > gavin
> >
> >
>
>