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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I calculate time average? 1

Status
Not open for further replies.

Thijs

Technical User
Nov 24, 2000
31
NL
LS,

I have a mdb with several fields. One of the fields contains the duration of a telephone-call. What I want to do is to calculate the duration of all calls per day.
But the average function is working voor a time format.

I've tried to convert time --> number but that didn't work either.

The format of the time field is 00:00:00 (HH:MM:SS). Can anyone help me with this problem?!

Thnx in advance,

Grts,

Thijs Kromhout
The Netherlands
 
Use the following to convert your string field to a number

stringvar h:={OPEN_TIME};
3600*(ToNumber(h[1 to 2])) + 60*(ToNumber(h[4 to 5])) + ToNumber(h[7 to 8]);

Once this is done, you can this avg it out.

Hope this helps. Brian
 
Brian,

One word:

YEEHAA!!!!

Thijs :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top