Start time till end time

  • Thread starter Rogier Getrokpn
  • Start date
R

Rogier Getrokpn

hello all,

I want to look how long people are working on a call.
I want to do this on the following way;
the call is pending (start time)
the call is on hold (stop counting the working time)
the call is pending again (start time)

I want to see how long they are really working on the call, without the time
that the call is on hold.

Is someone who can help me?

Best regards,
Rogier
 
F

fredg

hello all,

I want to look how long people are working on a call.
I want to do this on the following way;
the call is pending (start time)
the call is on hold (stop counting the working time)
the call is pending again (start time)

I want to see how long they are really working on the call, without the time
that the call is on hold.

Is someone who can help me?

Best regards,
Rogier

You need 4 separate fields:
[CallStart], [CallPause],[CallResume] and [CallEnd]

Then, (untested Air Code) ... to calculate the elapsed active time
(in minutes) in a query:

ActiveTime:DateDiff("n",[CallStart],[CallEnd])-IIf(Not
IsNull([CallPause]),DateDiff("n",[CallPause],[CallResume]),0)

Note: Each of the above fields should include the Date and Time, not
just the Time.

Of course, the [ActiveTime] value ought not be saved in any table.
Anytime you need the ActiveTime, recalculate it, as above.
 
K

KARL DEWEY

Are your 'start time' and 'end time' in a DateTime field?
Post your table structure with field names and data type.
Post sample data.
 
D

David G.

I would disagree with Fred's assessment. His design assumes there
could be only one hold during any session. If that's the case, then
Fred's design would suffice.

I would recommend the following tables:

tblCall
--CalIDl(pk)
--Subject

tblActivity
--CallID(fk)
--TimeStamp

(You will need many more fields, but the above are required to
calculate your call time.)

and the following Form:

frmCall
source=tblCall
combox cbxCall
source=tblCall
commandbutton cmbButton1(.caption = "Start")
comanndbutton cmbButton2 (.caption = "Pause")
OPTIONAL subform sfrmActivity
source tblActivity where tbxCallID = tblCallID

cmbButton1_onClick
if cmbButton1.caption = "Start" then
add record to tblActivity (CallID,NOW()*-1)
change cmbButton1.caption to "STOP"
else:
add record to tblActivity (CallID,NOW())
change cmbButton1.caption to "START"
end if

cmbButton2_onClick
if cmbButton2.caption = "Pause" then
add record to tblActivity (CallID,NOW())
change cmbButton2.caption to "RESUME"
else:
add record to tblActivity (CallID,NOW()*-1)
change cmbButton2.caption to "PAUSE"
end if

(You would need to add additional button control to prevent a Start
for a call already started, or a resume without a pause, etc.)

The idea of the negative time entries allows a summation query to
calculate the total call length by summing the time stamps. I don't
know that you can use Now()*-1 directly. You might have to use the
serial value and convert back and forth. (I recommend saving the Now()
value in the table. Don't save any calculated or derived values.)

No limit to the number of pauses during a call. A call could even be
restarted.

Hope this helps
hello all,

I want to look how long people are working on a call.
I want to do this on the following way;
the call is pending (start time)
the call is on hold (stop counting the working time)
the call is pending again (start time)

I want to see how long they are really working on the call, without the time
that the call is on hold.

Is someone who can help me?

Best regards,
Rogier

You need 4 separate fields:
[CallStart], [CallPause],[CallResume] and [CallEnd]

Then, (untested Air Code) ... to calculate the elapsed active time
(in minutes) in a query:

ActiveTime:DateDiff("n",[CallStart],[CallEnd])-IIf(Not
IsNull([CallPause]),DateDiff("n",[CallPause],[CallResume]),0)

Note: Each of the above fields should include the Date and Time, not
just the Time.

Of course, the [ActiveTime] value ought not be saved in any table.
Anytime you need the ActiveTime, recalculate it, as above.
THANKS!
David G.
 
R

Rogier Getrokpn

Karl,

The fields are datetime fields.
And i have a field with the status of the call.
And i want to have for each status the exact time stamp.
But when for example: the status is "in progress" and switch to "on hold"
and back to "in progress" i want the working time of in progress. I hope you
understand me issue.

Regards
Roger
 
R

Rogier Getrokpn

wow, this looks very difficult for me. Can you please explain it more for me?

thanks
Rogier

David G. said:
I would disagree with Fred's assessment. His design assumes there
could be only one hold during any session. If that's the case, then
Fred's design would suffice.

I would recommend the following tables:

tblCall
--CalIDl(pk)
--Subject

tblActivity
--CallID(fk)
--TimeStamp

(You will need many more fields, but the above are required to
calculate your call time.)

and the following Form:

frmCall
source=tblCall
combox cbxCall
source=tblCall
commandbutton cmbButton1(.caption = "Start")
comanndbutton cmbButton2 (.caption = "Pause")
OPTIONAL subform sfrmActivity
source tblActivity where tbxCallID = tblCallID

cmbButton1_onClick
if cmbButton1.caption = "Start" then
add record to tblActivity (CallID,NOW()*-1)
change cmbButton1.caption to "STOP"
else:
add record to tblActivity (CallID,NOW())
change cmbButton1.caption to "START"
end if

cmbButton2_onClick
if cmbButton2.caption = "Pause" then
add record to tblActivity (CallID,NOW())
change cmbButton2.caption to "RESUME"
else:
add record to tblActivity (CallID,NOW()*-1)
change cmbButton2.caption to "PAUSE"
end if

(You would need to add additional button control to prevent a Start
for a call already started, or a resume without a pause, etc.)

The idea of the negative time entries allows a summation query to
calculate the total call length by summing the time stamps. I don't
know that you can use Now()*-1 directly. You might have to use the
serial value and convert back and forth. (I recommend saving the Now()
value in the table. Don't save any calculated or derived values.)

No limit to the number of pauses during a call. A call could even be
restarted.

Hope this helps
hello all,

I want to look how long people are working on a call.
I want to do this on the following way;
the call is pending (start time)
the call is on hold (stop counting the working time)
the call is pending again (start time)

I want to see how long they are really working on the call, without the time
that the call is on hold.

Is someone who can help me?

Best regards,
Rogier

You need 4 separate fields:
[CallStart], [CallPause],[CallResume] and [CallEnd]

Then, (untested Air Code) ... to calculate the elapsed active time
(in minutes) in a query:

ActiveTime:DateDiff("n",[CallStart],[CallEnd])-IIf(Not
IsNull([CallPause]),DateDiff("n",[CallPause],[CallResume]),0)

Note: Each of the above fields should include the Date and Time, not
just the Time.

Of course, the [ActiveTime] value ought not be saved in any table.
Anytime you need the ActiveTime, recalculate it, as above.
THANKS!
David G.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top