Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subtracting Dates
Message
De
23/11/1999 13:44:51
 
 
À
23/11/1999 13:37:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00294459
Message ID:
00294466
Vues:
17
>I can't get my dates to subtract correctly. I keep getting huge numbers. I want to subtract the system date with a birth date to get an age for that person. I am doing this in a SQL statement.
>
>select student.studentid, student.lname, date() - student.bdate as age
>from student into cursor clage
>
>My date format is in mdy. I get numbers like 7518. How come this is happening?
>
>Thanks in advance,
>Tyler G.

(year(date())-year(student.bdate)-iif(student.bdate>date(),1,0)) as AGE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform