Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating age
Message
From
26/03/1998 22:54:23
Michel Lalonde
Laboratoire Médical Biron
Lachine, Quebec, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00086545
Message ID:
00087544
Views:
46
I have a sample routine for you.

FUNCTION Age
LPARAMETERS tdBirthdate

RETURN INT((VAL(DTOS(DATE())) - VAL(DTOS(tdBirthDate))) / 10000)



>There's a good article in this month's issue of FoxTalk that's right on point for your question. It's an elegant solution that involves using gomonth() to calculate the number of months between the person's birthdate and today. What makes this a good solution is that it avoids the entire leap year issue.
>Good Luck,
>-Dore
>
>>Hi,
>>
>>Does any of you have a good and simply routine to calculate the age of a person, depending upon the current date.
>>
>>
>>Thnx in advance
>>
>>Marc
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform