Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ctot
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Ctot
Divers
Thread ID:
00814292
Message ID:
00814314
Vues:
21
This message has been marked as the solution to the initial question of the thread.
First, you've to convert times into second, sum them and than convert back. Something like
h0 = "00:00:00"
h1="04:00:00"
h2="03:30:00"
sec1 = CTOT(h1) - CTOT(h0)
sec2 = CTOT(h2) - CTOT(h0)
SecSum = sec1 + sec2
hSum = PADL(INT(SecSum/3600), 2, "0") + ":" + ;
		PADL(INT((SecSum%3600)/60),2, "0") + ":" + ;
		PADL(SecSum % 60,2, "0") 
? hSum
>I only want to add two variables with that format (add hours)
>h1="04:00:00"
>h2="03:30:00"
>or this
>h1="0400"
>h2="0330"
>As I should make it?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform