|
-
Nov 29th, 1999, 09:45 AM
#1
Thread Starter
New Member
I have a label with a value of 00:00:06 (numeric)as the caption. Ihave another label with a numeric caption of 00:00:03. How do I add both captions together to get a result on a third label caption?. What is the formula I should use?
Thanks in advance
bjk
-
Nov 29th, 1999, 10:36 AM
#2
I don't have time to do the whole thing, but here is a general method, and I'm sure you can actually do the code yourself. First break each label caption into three fields: hours, minutes and seconds using the Left, Mid and Right functions. Then add the seconds together, If the total is > 59, sub tract 59 and add the remainder to one of the minutes fields. Handle the minutes in a similar fashion, adding any remainder to the hours. Once you have the three totals, do something like lblThree.Caption = intHoursTot & ":" & intMinsTot & ":" & intSecsTot
------------------
Marty
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|