Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating age
Message
De
26/03/1998 22:54:23
Michel Lalonde
Laboratoire Médical Biron
Lachine, Québec, Canada
 
 
À
24/03/1998 12:48:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00086545
Message ID:
00087544
Vues:
50
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform