Mensaje
General information
Foro:
Visual FoxPro
Category:
Programación, sintáxis y comandos
Título:
Re: Ctot
Miscellaneous
ID de la conversación:
00814292
ID del mensaje:
00814314
Views:
22
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--
Previous
Next
Responder
Mapa
Ver