Time Calculation

benwo

Registered User.
Local time
Today, 23:40
Joined
Nov 29, 2005
Messages
39
Hi

I've got a table that stores information from my telephone system. there are a couple of columns that contain times of when a call started and when it finished. the format is 17:11:30 for both the start and end times. i have added another column and in here i want to have the call duration, i.e. the end time minus the start time should give the actual call duration.

Any ideas how i can calculate this?

Thanks a lot

Ben
 
You should be able to use datediff() to get this value but I don't think I would store it anywhere, just calculate it as you need it...
 
idealy i would like to store the total duration in another column and have just automatically calculate when the data is added, do you know if this is possible?
 
Yes you can run a pc of code in the input form to set this value when the time is entered in one fld it set the duration value in the second fld but you really should just calculate this on the fly whenever you need it. There really is no need to store it...
 
Use DateDiff()

Code:
DateDiff("n",[time1],[time2])

Col
 

Users who are viewing this thread

Back
Top Bottom