Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Age calculations
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00179005
Message ID:
00179254
Vues:
24
Hi Ken,

Try born on February 28, 1979.

Age on February 28, 1980: 0
Age on February 28, 1981: 2
Age on February 28, 1982: 3
Age on February 28, 1983: 4
Age on February 28, 1984: 4
Age on February 28, 1985: 6

The problem is that some date ranges will have more than (# years/4) leap years and some will have less...

Joe

>Hiya Mike,
>
>Try:
>
>floor((date() - d_Birth)/365.25)
>
>The value 365.25 accounts for leap years.
>
>>greetings to all
>>
>>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
>>
>>any ideas?
>>
>>regards
>>mike peizate
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform