Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Age calculation (Years, Months and days)
Message
De
17/09/2003 12:13:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00829932
Message ID:
00829947
Vues:
18
>Hi Everybody.
>I want to calculate exact Age. I have problem in months and days calculation should I use 30.42 as average month or there is another way to calculate it.
>Thanks in advance
>Zaheer

I am curious - do you use the Gregorian (Christian) calendar? Because I understand that in the Islamic calendar (does it have a different official name?), the average age is more like 29.5 days.

Anyway, in the Gregorian calendar, the integer number of elapsed years can be calculated as follows:

int((val(dtos(date1)) - val(dtos(date2))) / 1e4)

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform