P
Poida3934
I am trying to calculate the age of pre-school students at start of school
year, and have
a "flaw" somewhere if the birth month is the same as start of year month.
The first formula
below gives me the years, the second the months, can anyone spot the
error???
=DateDiff("yyyy",[StudDOB],[Year_Start])+Int(Format([Year_Start],"mmdd")<Format([StudDOB],"mmdd"))
=DateDiff("m",[StudDOB],[Year_Start]) mod 12
So, 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).
Any clues folks? Thanks in anticipation, your help in here has been
tremendous over the last
few weeks.
Poida
year, and have
a "flaw" somewhere if the birth month is the same as start of year month.
The first formula
below gives me the years, the second the months, can anyone spot the
error???
=DateDiff("yyyy",[StudDOB],[Year_Start])+Int(Format([Year_Start],"mmdd")<Format([StudDOB],"mmdd"))
=DateDiff("m",[StudDOB],[Year_Start]) mod 12
So, 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).
Any clues folks? Thanks in anticipation, your help in here has been
tremendous over the last
few weeks.
Poida