calculate total years by date of birth (08-12-1960)

A

Andrew

I like to apply access on my job. need to determine how many students i have of 13 years. 20 years..etc. This information its important for reports every month. How i do it ? DOB 08-12-1960 =? years (in numbers)
 
F

fredg

I like to apply access on my job. need to determine how many
students i have of 13 years. 20 years..etc. This information its
important for reports every month. How i do it ? DOB 08-12-1960 =?
years (in numbers)

In a query:
Age: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)

Directly as the control source of an unbound control:
=DateDiff("yyyy",[DOB],Date())-IIf(Format([DOB],"mmdd")>Format(Date(),
"mmdd"),1,0)

You do know, I hope, that this Age computation should NOT be stored in
any table.
Just compute it and display it on a form or report, as needed.
 

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