Calculating Age from DOB

A

Ant

I have a Date Of Birth (DOB) field and need to calculate the age. I have
tried “Datediff(“yyyy”,[DOB],Now())” this seams to work most of the time
however if for example you are 25 at the end of Jan this calculation will
show that you are 25 from 1st Jan. Any ideas?



Thanks
 
R

Rick B

DateDiff("yyyy",[Birthdate],Date())+(Format([Birthdate],"mmdd")>Format(Date(
),"mmdd"))
 
A

Ant

Thanks for that! I had been working on it for hours!

Rick B said:
DateDiff("yyyy",[Birthdate],Date())+(Format([Birthdate],"mmdd")>Format(Date(
),"mmdd"))







Ant said:
I have a Date Of Birth (DOB) field and need to calculate the age. I have
tried "Datediff("yyyy",[DOB],Now())" this seams to work most of the time
however if for example you are 25 at the end of Jan this calculation will
show that you are 25 from 1st Jan. Any ideas?



Thanks
 

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