how to evaluate approx "birthday" knowing "age" and current date

F

fred75

HAVE TO EVALUATE (APPROXIMATELY) A BIRTH DATE FROM CURRENT DATE KNOWING "AGE".

EX: PERSON AGE = 41 YEARS OLD
WOULD BE BORN IN 2009 - 41 = 1968
THEN DATE COULD BE (TODAY'S DATE) MINUS (41) = DAY/MONTH/1968
TO GET THE FOLLOWING: 04/03/2004 - 41 = 04/03/1968

ANYONE CAN HELP ?

THANKS

FRED75
 
A

Al Campagna

Fred,
Just a minor point... typing emails in all caps is considered
"shouting."
It can also be more difficult to read. No big deal... but please use
upper and lower case

Try this calculation...
Example... Age = 41

= CDate(Day(Date()) & "/" & Month(Date()) & "/" & Year(Date())-Age)

Yields 3/4/68
This method "builds" a date "string", and the Cdate converts it to a
legitimate date value.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
T

Tom van Stiphout

On Fri, 3 Apr 2009 04:48:11 -0700, fred75

You can use this one-liner:
(suppose the age is kept in a variable named intAge)
DateAdd("yyyy", -intAge, Date)

Personally I would not want to guess at it. On average you are about
half a year off.

-Tom.
Microsoft Access MVP
 
J

John Spencer MVP

Use DateAdd function

DateAdd("yyyy",-[Age],Date())

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
J

John W. Vinson

HAVE TO EVALUATE (APPROXIMATELY) A BIRTH DATE FROM CURRENT DATE KNOWING "AGE".

EX: PERSON AGE = 41 YEARS OLD
WOULD BE BORN IN 2009 - 41 = 1968
THEN DATE COULD BE (TODAY'S DATE) MINUS (41) = DAY/MONTH/1968
TO GET THE FOLLOWING: 04/03/2004 - 41 = 04/03/1968

ANYONE CAN HELP ?

THANKS

FRED75

DateAdd("yyyy", -[Age], Date())

will return today's date Age years ago.

As Al says, typing in all caps is considered impolite. If you don't like to
use the shift key it's better to type in all lower case.
 
J

James A. Fortune

fred75 said:
HAVE TO EVALUATE (APPROXIMATELY) A BIRTH DATE FROM CURRENT DATE KNOWING "AGE".

EX: PERSON AGE = 41 YEARS OLD
WOULD BE BORN IN 2009 - 41 = 1968
THEN DATE COULD BE (TODAY'S DATE) MINUS (41) = DAY/MONTH/1968
TO GET THE FOLLOWING: 04/03/2004 - 41 = 04/03/1968

ANYONE CAN HELP ?

THANKS

FRED75

After subtracting "Age" years from the current date you have one year of
days that, unless you have additional information, should be considered
equally likely to contain the actual birthday date. Therefore, to
obtain the best guess at a birthday date, the date obtained by
subtracting "Age" years should also have approximately six months
further subtracted.

James A. Fortune
(e-mail address removed)

BRICKFIELDER - A heavy (cold) gale that brought dirt and dust to Sydney
from nearby brickfields and sandhills. (2) A hot dry wind, blowing from
the interior, in south-eastern Australia. -- Dictionary of Australian
Slang, Second Edition, Sidney J. Baker, 1943 (Price: Three shillings &
sixpence)
 
J

John Spencer MVP

James Fortune,

If you mean that you want the middle date of the year then use DateSerial
function to return July 1 of the year.

DateSerial(Year(Date())-[Age],7,1)

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
J

John Spencer

Ahh! Now I see what you meant.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

James Fortune,

If you mean that you want the middle date of the year then use
DateSerial function to return July 1 of the year.

DateSerial(Year(Date())-[Age],7,1)

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
After subtracting "Age" years from the current date you have one year
of days that, unless you have additional information, should be
considered equally likely to contain the actual birthday date.
Therefore, to obtain the best guess at a birthday date, the date
obtained by subtracting "Age" years should also have approximately six
months further subtracted.

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top