Results 1 to 3 of 3
  1. #1
    Larryg is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    50

    Time doesn't add up correctly

    Greetings...
    I an using Minutes: DateDiff("n", [StartDateTime], [EndDateTime]) in my query, and =[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00") in an unbound control on my report.
    The time per record looks correct but the =Sum[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00") calculation looks off.
    For instance, one group displays the time in the individual records as follows:
    0:15
    0:25
    2:30
    0:20


    That totals 210 minutes, however, the calculated Sum is showing 3:15. Seems to me it should be showing 3:30, or if fractional 3.5.
    Another example is: 2:00, 1:30, 0:05 and the Sum is showing 3:00.

    Can someone help me understand this?

    Thanks...

    Larry

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What is your actual formula, as that would error? You would need to sum both instances of the minutes field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Can't use Format() function to directly convert decimal hours to hh:mm. Review:
    http://bytes.com/topic/access/answer...e-regular-time
    https://www.accessforums.net/access/...ort-33806.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 7
    Last Post: 09-28-2023, 08:41 AM
  2. Replies: 8
    Last Post: 07-03-2015, 05:03 PM
  3. Listbox won't display time correctly
    By UserX in forum Access
    Replies: 7
    Last Post: 06-26-2014, 05:39 PM
  4. Replies: 15
    Last Post: 12-10-2012, 06:37 PM
  5. Replies: 2
    Last Post: 07-23-2011, 08:16 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