Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Age calculations
Message
De
22/01/1999 12:24:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00179005
Message ID:
00179028
Vues:
25
LPARAMETERS tdBirthDate

lnAge = Year(Date()) - Year(tdBirthDate)

DO CASE
CASE Month(Date()) = Month(tdBirthDate)
   lnAge = lnAge + IIF(Day(Date()) < Day(tdBirthDate), 0, 1)
CASE Month(Date()) > Month(tdBirthDate)
   lnAge = lnAge + 1
ENDCASE

RETURN lnAge
HTH

>i need the code for calculating the age as follows:
>i habe a field where we input the date.
>i need to calculate the age on another field based on the current date
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform