Obviously, if you think that your data may cross midnight then you have more work. HINT: Adding an elapsed time in seconds to a DATETIME value will correctly change the date when appropriate.
HINT 2: instead of adding seconds to a TIME or DATETIME value, USE the ADDSEC function. This will assure that your calculations will be correct regardless of your TIME settings. This is just good defensive programming. Would'nt it be convenient to have an ELAPSEDSECONDS(DATETIME,DATETIME) function? I don't see it in the V8 docs. Dennis McGrath ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Wills, Steve Sent: Tuesday, April 29, 2008 4:44 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Need to Add Time to Time Dan, now that Bill has given you a proper solution, do/could any call cross over the dateline, i.e. the witching hour of midnight (12:00am)? If not, no prob'. If so, I think you might have to consider DATETIME types as part of the solution mix. My time-devalued $0.02, Steve in Memphis From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Sent: Tuesday, April 29, 2008 4:22pm 16:22 To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Need to Add Time to Time Perfect solution... Thanks, just what I needed. At 04:49 PM 4/29/2008, you wrote: vtotalseconds INT = + ( (IHR(.drive) * 60 * 60) + (IMIN(.drive) * 60) + (ISEC(.drive)) ) Dan Champion Service Department Manager Vredevoogd Heating & Cooling Grandville, MI. 49418 616-534-8271 x 14

