Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement