Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very fast age calculation
Message
De
24/07/2000 12:44:31
 
 
À
24/07/2000 12:32:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00396199
Message ID:
00396212
Vues:
9
>Hello, All.
>
>Today I've discovered something I didn't know: how to calculate age with 1 (one) line of code. Maybe you know this, but don't be offended, please. I will post this
>
>x=int((val(dtos(date()))-val(dtos(birth_date)))/10000)
>
>x is age.

It's not as fast or as accurate as:

x=int((date()-birthdate)/365.25)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform