Example
10:02:00
- 8:56:45
-----------
1:05:15
10:07:22
+ 8:56:45
-----------
19:04:07
19:04:07 / 2 = 09:28:22.5 = 09:32:03:30
I've expressed the half second as 30 jiffies
to be consistent with the sexagesimal representation.
Your answer is rounded up. Excel knows how to do this. It converts date and time fields to an internal representation, does the arithmetic, and then converts back.HRS: 13
MINS:48
SECS:54
HRS1:13
MINS1:17
SECS1:39
Then the midpoint as per excel sheet comes out to be 13:33:16
When you said add them and divide by two how will it work in this case?
Step 1: Add the two times together using base 60 arrithmetic
13:48:54
+ 13:17:39
------------
26:65:93 sums should be modulo 60 with a carry
= 27:06:33
Step 2: Divide by 2
27/2 : 06/2 : 33/2 = 13.5:03:16.5
Step 3: Convert fractions to the next lower group
13.5 hrs = 13:30:00:00
03 mins = 00:03:00:00
16.5 secs = 00:00:16:30
Step 4: Add 'em up
Result = 13:33:16:30
Reread the example in the previous post since I made an edit to it rather than creating a new post. The general rule for adding seconds and minutes is that whenever you get a number greater than 60, you generate a carry of 1 minute or 1 hour as appropriate and reduce the sum by 60. For example if you add 50 seconds to 43 seconds and get 93 seconds that is the same as (93-60=33 seconds) plus a carry of 1 minute. A similar operation happens with borrow when you borrow from the hours column that is equivalent to 60 minutes.@papabravo
I am not clear with the example you posted
Look for the bit in the STATUS Register labeled `DC' for Digit CarryI am using PIC18f67J90
by Aaron Carman
by Jake Hertz
by Aaron Carman
by Jake Hertz