How do I calculate age to a specific date in the future, in Access

T

Tricky

I am trying to calculate members age's to various specific dates in the
future to enable me to enter members in to events on that date.
 
G

ghetto_banjo

if you have their birthdate in a field, and the event date in another
field, you can use the datediff() function.

age = datediff("yyyy", birthdate, eventdate)
 
D

Dale Fye

This method is not reliable.

Datediff("yyyy", #12/31/08#, #1/1/2009#) = 1

even though only there is really only 1 day difference.

See Daniels post for a better method.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
M

MGFoster

Tricky said:
I am trying to calculate members age's to various specific dates in the
future to enable me to enter members in to events on that date.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While Daniel Pineault's function is pretty nifty, if you just want the
person's age in years the following expression has worked for many
people (watch out for line wrap).

Year(Now())-Year(birthdatefield) + (DateSerial(Year(Now()),
Month(birthdatefield), Day(birthdatefield))>Now())

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSaXKdoechKqOuFEgEQI3wwCgs3yl7NTt7bmVo8X9ZvI+RHzpnaQAnjvd
gdOYbHFUO7vmGL8I9yPCDmQQ
=QDW/
-----END PGP SIGNATURE-----
 
Top