Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accurately calculating a persons age
Message
 
À
22/10/2004 13:28:44
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:
00953945
Vues:
12
For Feb 29, if you go 12 months back, or 12 months forth, you end up on Feb 28. If you go by days, it is the same.
If you are born on February 29, when are you 1 year old? Never? We don't need the 365.256363051 to get dizzy...

>For play.
>To go forward or backward with months are not the same thing.
>
>For next case, is correct young,old or both??
>
>IF GOMONTH({^1998/02/28},-18*12)>= {^1980/02/29}
>	? 'old'
>ELSE
>	? 'young'
>ENDIF
>IF {^1998/02/28}>= GOMONTH({^1980/02/29},18*12)
>	? 'old'
>ELSE
>	? 'young'
>ENDIF
>
>
>Fabio
>
>>IF GOMONTH(DATE(),-18*12)>= DateOfBirth the person is older than 18.
>>
>>>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
Doru
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform