Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apply to text box (Age Calculator)
Message
De
13/03/2005 04:55:00
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00995253
Message ID:
00995259
Vues:
13
hi,
i dont understand exactly what you mean, but i try with textbox as under it works,
SET CENTURY on
SET DATE TO dmy
date2 = date()
date1=(thisform.text1.value)
? int((val(dtos(date2)) - val(dtos(date1))) / 10000)
>Mohammad Qasem, thank for your reply i am getting resutl "44" with your codes. may i can not explaine my requirement. i want day month and year. form current date. i am using these code for this purpose.
>
>ccyear=YEAR(DATE())-YEAR(dbirth)
>cyear=ccyear
>ccmonth=MONTH(DATE())-MONTH(dbirth)
>cmonth=ccmonth
>IF cmonth<0
>cyear=ccyear-1
>endif
>.year.value=cyear
>*cmonth=MONTH(DATE())-MONTH(jdate)
>IF cmonth<=0
>cmonth=cmonth-cmonth-cmonth
>dccmonth=cmonth
>ccmonth=12-dccmonth
>endif
>dccmonth=ccmonth
>IF ccmonth<=0
>dccmonth=12-12
>endif
>.month.value=dccmonth
>*
>cday=DAY(DATE())-DAY(dbirth)
>IF cday<0
>ccmonth=ccmonth-1
>ENDIF
>cday=MONTH(dbirth)-cday
>IF cday<=0
>cday=cday-cday-cday
>endif
>.day.value=cday
>
>but it is problem when leep year and -simbole. i download the "age calauter"
>
>its result is good. i thing 100% true. but problem is use for a text box
>thanks for your reply
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform