Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time calculation
Message
From
06/11/2001 08:21:35
 
 
To
06/11/2001 05:06:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00577597
Message ID:
00577891
Views:
21
>>>Hi all
>>>I have a table that contains all incoming and out going calls,
>>>with the Following fileds call_date , call_time phoneline and duration of each call,
>>>What I need to know is if it ever happen that all lines where busy at the same time and if yes for how long,
>>>Thank You
>>
>>The algorithm, I think, would be something like this:
>>
>>Convert each record to two: one with start_date_time, one with end_date_time. Go through the result in chronological (date_time) order. Start with zero. Add one for each time a call starts, subtract one for each time a call finishes. Alarm when your count = MAX_COUNT (the number of available phone lines).
>>
>>HTH, Hilmar.
>
>Hi Hilmar,
>
>Good idea, but most of the systems I interface with don't report on the call until it is completed. Notice his 'duration' field ? Your alarm won't work in this case. Realtime, that is. I'm trying it with some historical data... :>)

Ugh. Well, I got something working, but it showed me how bad my data really was. In my case, the callstart time is to the minute, while the duration is to the second. This gave me a bunch of false 'hits', around 190 out of 11,000+ records.

With good data, your idea works fine. Thanks for getting me thinking. :>)
Previous
Reply
Map
View

Click here to load this message in the networking platform