Age calculation glitch?

P

Poida3934

I am trying to calculate the age of pre-school students (at start of school
year) on a report,
and have a "flaw" somewhere if the birth month is the same as start of
school year month.
So, for a student whose birth date is 4th January 2003, and school year
start is 1st January
2008, I get 4 years and 0 months as his age (should probably show 11 months,
hehehe).
My current formulas below give me firstly the years, and then months, and
work fine as long
as the months aren;t identical!

=DateDiff("yyyy",[StudDOB],[Year_Start])+Int(Format([Year_Start],"mmdd")<Format([StudDOB],"mmdd"))

=DateDiff("m",[StudDOB],[Year_Start]) mod 12

Any suggestions? I've had one solution offered creating a function using
code, which I am
not well versed in yet. Is there a remedy via tweaks to my formulas above?
Thanking you
in anticipation, your help in here has been tremendous over the last few
weeks.

Poida
 

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

Similar Threads

Age Calculation Flaw? 1
Years and Months age calculation? 2
Need help with Between dates on birthday calculation 9
Average Age 8
Age 9
basage modular 4
Age Display Error 4
Calculating Age 8

Top