Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subtract two times
Message
De
27/12/2004 05:24:36
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7
Divers
Thread ID:
00971289
Message ID:
00972284
Vues:
15
hi,
thank you very much,it works.
how i can let him add every time at totaltextbox as
if thisform.text1.value=14:35 then thisform.totaltxt.value=14:35
if i insert again at thisform.text1.value=15:30
i need to see at thisform.totaltxt.value=30:05 etc..
thanks alot
m.qasem



>
>RETURN c_hours+":"+c_min+":"+nSecs
>
>
>>hi,
>>i try .but i get error message operator/operand type mismatch
>>
>>RETURN c_znak+c_hours+":"+c_min+":"+nSecs &&operator/operand type mismatch
>>
>>thanks.
>>m.qasem
>>>
>>>*** Method name TimeAdd
>>>
>>>   LPARAMETERS nSecs, nSec2
>>>   LOCAL c_hours, c_min, c_znak, nLocSec
>>>   IF TYPE("nSecs") # "C" .OR.;
>>>      TYPE("nSec2") # "C" .OR.;
>>>      TYPE("nSecs") # TYPE("nSec2")
>>>      RETURN ""
>>>   ENDIF
>>>
>>>   nLocSecs = VAL(LEFT(nSec2,2))*3600
>>>   nLocSecs = nLocSecs + VAL(SUBSTR(nSec2,4,2))*60+ VAL(SUBSTR(nSec2,7,2))
>>>   nLocSecs = nLocSecs + (VAL(LEFT(nSecs,2))*3600 + VAL(SUBSTR(nSecs,4,2))*60+ VAL(SUBSTR(nSecs,7,2)))
>>>
>>>   nSecs   = ABS(nLocSecs)
>>>   c_hours = INT(nSecs/3600)
>>>   IF c_hours > 24
>>>      RETURN ""
>>>   ENDIF
>>>   nSecs   = nSecs - (c_hours*3600)
>>>   c_hours = IIF(c_hours<10,"0","")+ALLTRIM(STR(c_hours,15))
>>>   c_min   = INT(nSecs/60)
>>>   nSecs   = nSecs - (c_min*60)
>>>   c_min   = IIF(c_min<10,"0","") + ALLTRIM(STR(c_min,15))
>>>   nSecs   = IIF(nSecs<10,"0","") + ALLTRIM(STR(nSecs,10))
>>>
>>>RETURN c_znak+c_hours+":"+c_min+":"+nSecs
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform