Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seconds between two events

Status
Not open for further replies.
Apr 23, 2002
39
US
I'm working on a help desk app logging calls. Two events are captured, the "Start Call" and the "End Call". I want to calculate the length of the call (End Call - Start Call), typically never less than 30 minutes in duration. As there may be reports later down the line and I want to be able to query against the "Call Duration" field, what type of field should it be? I was thinking a TIME field isn't really right, but I may be wrong. Should it be an Long Integer and capture the seconds between the two values?

Thanks,
Don
 
BTW, the above should read, "typically never more than 30 minutes in duration".
 
Have StartCall = Now (formatted however you like).
Have EndCall = Now (formatted however you like).

Then CallDuration is simply EndCall - StartCall - formatted however you like, be it minutes + seconds, or just seconds.

It can be just a text field taking the value.

Gerry
 
Uh....yes, but rather elaborate, and covers MORE than you need (it covers days...which you do not need).

It describes formatting well, I guess. Help does too. really though. Really, though just do a StartCall Now, and EndCall Now...and subtract them.



Gerry
 
in other words - yes - a time field will be fine :)

Time is just the decimal part of a day so if you try and capture the number of seconds, you will hvae to do a lot of transformation to be able to do anything useful with it...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top