# Age as of Jan 1 current year

I need a formula to calculate an employee's age as of January 1 of the current year.

I need another formula to calculate an employee's age as of January 1 of the upcoming year.

Any assistance would be greatly appreciated.  Thanks
Ido Millet

``````DateVar BirthDate := {Your_BirthDate_Field};
DateVar Start_year := Date(Year(currentdate), 01, 01);

if (Month(Start_year) * 100) + Day (Start_year) >= (Month(BirthDate) *100) + Day (BirthDate)
then Year(Start_year) - Year(BirthDate)
else Year(Start_year) - Year(BirthDate) -1;``````

And the age at the start of next year is simply the above + 1.
What about those born on 1 Jan?

If someone was born on say , 1 Jan 1983 do you want the answer for the current year to be 30 or 29?
jph826

Good question.  I would want their age on January 1, current year, or in your example, 30.  I'm having trouble getting the suggested formula to work.
You should change {Your_BirthDate_Field} to YOUR birthdate column.

If that was not the issue, please explain what type of "problem" you are referring to.

Thanks IdoMillet.  It hi-lights MY birthdate field, {PAEMPLOYEE.BIRTHDATE}, and says a date is required here.  If I change it to .... Date {PAEMPLOYEE.BIRTHDATE} it hi-lights everything after Date and returns "the remaining text does not appear to be part of the formula.

{PAEMPLOYEE.BIRTHDATE} is a DateTime field.
What is the data type of {PAEMPLOYEE.BIRTHDATE} ?