turning 65

slimjen1

Registered User.
Local time
Today, 03:30
Joined
Jun 13, 2006
Messages
562
All. I have a table with names and birthdates. I need to get a list of all people who are turning 65 within 3 months, 2 months and now. I started out with criteria "dob >90 days". I am drawing a blank. Please help.
Thanks
 
First of all you need to calculate the age

Age: DateDiff("yyyy", [DOB], Date())+ Int( Format(Date(), "mmdd") < Format( [DOB], "mmdd") )

And check that the age is 64 and that the birthday occurs in the period

Dateserial(year(date()), month(DOB),day(DOB)) between date() and Dateadd("m",3,date())

Brian
 
Try this:
Age: Round(DateDiff("d",[Birthday],Date())/365.25,2)
This takes the difference in days then divides by the days per year to get answers like 64.7 or 64.9
then put >=65 in your criteria.
 
Privateer

He wants people who are turning 65 not already 65, further more there are not 365.25 days in a year, normally 365 with every fourth year 366 , this means that your calculation is normally incorrect around birthdays.

Brian
 
This should return days left until birthday

CDate(Format([dob],"dd/mm") & "/" & (Year([dob])+65))-Date()
 

Users who are viewing this thread

Back
Top Bottom