Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to remove seconds in TIME() & subtract it.........
Message
De
11/08/2004 05:59:28
 
 
À
11/08/2004 05:34:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00930059
Message ID:
00932271
Vues:
31

i mean

thisform.text1.value=04:45:00
thisform.text2.value=11:30:00 +
thisform.text3.value=08:25:00
----------
thisform.text4.value=24:40:00


run this:
clear
timeSum=		CTOT('04:45:00')-CTOT('0:')
timeSum=m.timeSum+(	CTOT('11:30:00')-CTOT('0:'))
timeSum=m.timeSum+(	CTOT('08:25:00')-CTOT('0:'))

? STUFF(TTOC(CTOT('0:')+m.timeSum,2),1,2,;
     STR(INT(VAL(TTOC(CTOT('0:')+m.timeSum,2)))+24*INT(m.timeSum/86400)))
then:
PRIVATE timeSum
timeSum=		CTOT(thisform.text1.value)-CTOT('0:')
timeSum=m.timeSum+(	CTOT(thisform.text2.value)-CTOT('0:'))
timeSum=m.timeSum+(	CTOT(thisform.text3.value)-CTOT('0:'))

thisform.text4.value= STUFF(TTOC(CTOT('0:')+m.timeSum,2),1,2,;
    STR(INT(VAL(TTOC(CTOT('0:')+m.timeSum,2)))+24*INT(m.timeSum/86400)))
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform