Results 1 to 2 of 2
  1. #1
    mujaqo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2008
    Posts
    13

    Calculating time difference between the same field of different records

    Please help,
    How can I calculate the time difference between the current record time and the previous record time for the same phone number as shown below?


    Phone Number Call Time Reason Time diffrence between this call and last call for the same phone number
    616222111 06/04/2014 10:04 Appointment 0
    616222111 06/04/2014 11:58 Inquiry 62
    616222111 06/04/2014 12:39 Inquiry 41
    616222111 06/04/2014 13:23 Complaint 44
    616222111 06/04/2014 13:24 Appointment 1
    545566321 06/04/2014 15:51 Inquiry 0
    545566321 06/04/2014 19:06 Inquiry 195
    545566321 06/04/2014 19:36 Inquiry 30
    282244589 06/04/2014 13:11 Appointment 0
    282244589 06/04/2014 13:31 Complaint 20


  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    I'd suggest a recordset, sorted ascending on PhoneNumber and CallTime.
    Read a record store the time,
    read next record, calculate CallTime - stored CallTime
    refresh the storedTime
    Loop

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 04-24-2013, 10:44 AM
  2. Replies: 10
    Last Post: 12-27-2011, 01:20 PM
  3. Replies: 1
    Last Post: 12-14-2011, 05:35 PM
  4. Time Difference
    By jlclark4 in forum Queries
    Replies: 4
    Last Post: 10-13-2011, 09:23 AM
  5. Time difference
    By jguidry in forum Programming
    Replies: 1
    Last Post: 11-15-2008, 12:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums