determine time frame between to table entries

P

patricia

I have a table called "tickets" that holds help desk
ticket information and another table called "ticket_log"
that holds all the changes that were made to the "ticket"
label and date stamps each entry. Within each table
there is a field called "status". A ticket can be set to a
status more than 1 time (Open, handled, resolved, handled,
handled, handled, dispatched, handled, closed)- each
change in status is a new entry in the ticket_Log. How
can I compute the total number of hours a ticket was at
one particular status? (IE: # of hours "handled" )

Thanks
 
C

ChrisJ

Patricia,

an example.
Status Time Accum

Open 11:00
handled 11:01
resolved 11:02 00:01
handled 11:03
handled 11:04
handled 11:05
dispatched 11:06 00:04
handled 11:07
closed 11:08 00:05

Is this the sort of thing you need?
Do you need whole hours only or HH:MM:SS??
What if open/close is overnight??
Over a weekend??
Over a public holiday??
 
P

Patricia

yes, that is what I am looking for. The time frame would
be in days so the weekends/holidays do not matter. The
tickets are always open longer than 1 day.
 

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