What is [2002]: a field in your table, a control on your form, or are you
trying to use the constant 2002?
2002 isn't a date... If you're trying to see what their age was on, say,
January 1st, 2002, you'll need to use
=DateDiff("yyyy", [Driver DOB], #01/01/2002#) - IIf("0101" <
Format([Driver
DOB], "mmdd"), 1, 0)
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Papa said:
it didn't work, there is mistake somewhere. What I did, was:
=DateDiff("yyyy", [Driver DOB], [2002]) - IIf(Format([2002], "mmdd") <
Format([Driver DOB], "mmdd")), 1, 0) and ran it
thanks
:
I'm trying to calculate the age at future date (2002) from DOB in
acces.
the DOB name is Driver DOB and is like this mm/dd/yyyy. For example
convert
this 01/01/56 to 2002 (begining of 2002)
thanks
:
To calculate the age at any particular date, try:
DateDiff("yyyy", [DOB], [EDD]) - _
IIf(Format([EDD], "mmdd") < Format([DOB], "mmdd")), 1, 0)
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
I need to be able to calculate a woman's age at the time of her
baby's
birth,
based on the dates recorded in her DOB and EDD (estimated date of
delivery)
fields (i.e. calculate her "Age @ EDD"). Can anyone help me out?
Many
thanks!