Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculating how old a client is from 2 dates 1

Status
Not open for further replies.

willpp

MIS
Feb 12, 2010
7
GB
Hi
Is it possible to calculate how old a client is from the

{CLIENT.Date of Birth}
and when a client
{REGISTER.Date of Registration} field

Regards
Paul
 
Use Ken Hamady's age formula:

WhileReadingRecords;
DateVar Birth:= {table.birthdate};
DateVar Ann := {table.registrationdate};
if (Month(Ann) * 100) + Day (Ann) >=(Month(Birth) *100) + Day (Birth)
then Year (Ann) - Year(Birth)
else Year (Ann) - Year(Birth) -1

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top