Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ctot
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Ctot
Miscellaneous
Thread ID:
00814292
Message ID:
00814314
Views:
20
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
Reply
Map
View

Click here to load this message in the networking platform