Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating age
Message
De
31/03/1998 14:28:45
 
 
À
26/03/1998 22:54:23
Michel Lalonde
Laboratoire Médical Biron
Lachine, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00086545
Message ID:
00088473
Vues:
38
>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


Many thanks to al of you, now i can make up my mind on wich routine i will use.

Thnx.


Marc
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform