Age Calculation as of July 1st - any given year

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. 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!
 
D

Douglas J. Steele

DateSerial(Year(Date()), 7,1) will give you July 1st of the current year.
 
S

Samdev

Thank you! I replaced the #2005/07/01# with the dateserial function and
it works like a charm! Much appreciated!!!
 

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 Calc as of July 1 2
Age Calc as of July 1 1
Age 9
Age 4
Criteria for age calculation 5
Calculating Age 8
Age Calculation - Error 1
Calculating a person's age 2

Top