Age Calc as of July 1

S

SamDev

In a form, I want to calculate the age of customers as of July 1st - I want
to be able to look at the age at any point in time during the current year
and know the customer's age of July 1st. So if a customer's birthday is July
1 and was born in 1962 the age would read 43 but if the birthday is prior to
July 1st it would show 42.

I have come up (with help from the
newsgroups) with the formula below BUT I don't want to go into the formula
each year and change the #2005/07/01# to #2006/07/01# etc.....

=DateDiff("yyyy",[Date of Birth],#2005/07/01#)+(Format([Date of
Birth],"mmdd")<Format(#2005/07/01#,"mmdd"))

Any ideas?

Thx!
 
J

John Vinson

In a form, I want to calculate the age of customers as of July 1st - I want
to be able to look at the age at any point in time during the current year
and know the customer's age of July 1st. So if a customer's birthday is July
1 and was born in 1962 the age would read 43 but if the birthday is prior to
July 1st it would show 42.

I have come up (with help from the
newsgroups) with the formula below BUT I don't want to go into the formula
each year and change the #2005/07/01# to #2006/07/01# etc.....

=DateDiff("yyyy",[Date of Birth],#2005/07/01#)+(Format([Date of
Birth],"mmdd")<Format(#2005/07/01#,"mmdd"))

Any ideas?

Thx!

Answered in m.p.a.forms. Please - if you must post to multiple
newsgroups, crosspost by putting two or three (NO MORE!) newsgroups in
the Newsgroups line, rather than posting separately to each. This
keeps volunteers from wasting time answering questions which have
already been answered in another group.

John W. Vinson[MVP]
 

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