Try this but watch out if you change days, that is, go past midnight:
set var vStart time = 14:00:00
set var vEnd time = 18:00:00
set var vElapsed time = (AddSec(0:00:00, (vEnd - vStart) ))
show var vElapsed
If you are going over a date change then:
set var vStartdt datetime = '20/06/2010 14:00:00'
set var vEnddt datetime = '21/06/2010 13:00:00'
set var vElapsed time = (AddSec(0:00:00, (vEnddt - vStartdt) ))
show var vElapsed
Regards,
Alastair.
--------------------------------------------------
From: "Walker Duncan" <[email protected]>
Sent: Sunday, June 20, 2010 4:22 PM
To: "RBASE-L Mailing List" <[email protected]>
Subject: [RBASE-L] - Time Calculation
I am currently using RBase 6.5++ for Windows and have a table to track
events our volunteers work. One field is "StartTime" and another is
"Endtime" (both are "Time" data type and HH:MM format). I wanted to create
another field in the table that would calculate the hours . I tried by
defining the field a data type time and created an expression [
Endtime-Starttime). However I get an error saying it is not the same data
type.
Can someone help me with this.
Thanks,
Duncan
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.829 / Virus Database: 271.1.1/2950 - Release Date: 06/19/10
18:50:00