Turn Around Time Calculation Within A Query?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nicholas Davenport
    New Member
    • Aug 2010
    • 18

    #1

    Turn Around Time Calculation Within A Query?

    Hi, I hope someone can help me

    I have a Callback database that logs the time that a customer has called our department and have been unable to contact who they where after. When this happens a Callback would have been logged onto the database system. The information is logged and stored in my main table. I then have another table that records all the attempts that have been made by an agent to contact the customer back. These two tables are linked together using a MessageID auto number. This works fine, my issue is that i would like to produce a query that can calculate the turn around time from the customers first call to the time an agent has tried to contact the customer back.

    For example:
    MessageID 173570 SaveDate:14/09/2010 SaveTime: 14.13

    MessageID 173570 AttemptID 80681 Attempt 1 AttemptDate:14/09/2010 Attempttime:15. 18

    In this example the turn around time would be 65 minutes. How can I calculate the time difference in minutes from 14.13 to 15.18 into a column at the end of my query.

    Any help would be greatly appreciated
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi. Are your attempttime and savetime fields of Date/Time type? If they are you can use the DateDiff function with a specified qualifier to return the differences in whatever unit you require - minutes ("n"), seconds ("s"), hours ("h") etc as follows:

    TimeDiff: DateDiff("n", [Savetime], [Attempttime])

    If they are not true date/time fields you can still do such conversions, but before embarking on this path it would be better to know whether or not they are date/time first.

    -Stewart

    Comment

    Working...