Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slight twist on old problem - age from dob

Status
Not open for further replies.

greymonkey

Technical User
Jul 20, 2003
29
0
0
AU
Hi all,

I have this function working out the age from the date of birth and all is working fine.

Function Age(Birthdate As Date, Enddate As Date) As Integer
Age = DateDiff("yyyy", Birthdate, Enddate) + _
(Enddate < DateSerial(Year(Enddate), Month(Birthdate), Day(Birthdate)))
End Function

the problem is when I need to find the age of a person in september.

to be more percice i need to know how to make the date 1/9/ year(date()) into a format the access will reconise as a proper date.

any idears,
:>

 
Here is an idea that should work -

Cdate("1/9/"&Year(YourDate))


HTH,


Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top