Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accurately calculating a persons age
Message
De
22/10/2004 09:50:25
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00953701
Message ID:
00953716
Vues:
14
>Hi
>I am trying to create a function in either VFP8 or transact-SQL which will accurately determine if someone is 18 years old or more.
>
>I have had a few stabs at it, but I'm sure I've seen functions in the past that have done this.
>
>Does anyone know of such code or can point me at a back issue of FPA etc.?
>
>TIA,
>Simon

Let's see if I remember. It was something like this:
? int((val(dtos(Date2)) - val(dtos(Date1))) / 10000)
should give you int(years elapsed).
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