Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A twist on age calculation.
Message
 
 
À
30/12/2004 15:04:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00973330
Message ID:
00973419
Vues:
38
>
>>The days part is calculated last so I guess it should be aplied first. See if this is better.
dob = GOMONTH(dt - 18, - (33*12+6))
>>dob = GOMONTH(dt-dd, - (yy*12+mm))
>
>Seems to work on Rick's problem sample and the few others I have identified. Nicely done. Thanks!

Jim,

Expanding on my previous observation, days applied first, month second and years last. I'm not sure is it better than previous one, though. :)
dob = GOMONTH(GOMONTH(dt-dd, - mm), -yy*12)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform