Results 1 to 2 of 2
  1. #1
    Amras is offline Novice
    Windows 2K Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Sioux Falls, SD
    Posts
    29

    Sum Date/Time values in a query


    Thank you for taking a moment to read through my plight. Any assistance will be appreciated!

    I have a table of time values stored as Date/Time data type in Short Time format. I need to sum/add these values (grouped by LANID) to create a report that shows how much time a group of employees had over any entered date range. An example of the data would be as follows:
    0:04 C1504 2/1/2016
    0:06 C6166 2/1/2016
    0:06 C6166 2/1/2016
    0:04 C6166 2/1/2016
    0:07 C6166 2/1/2016
    0:04 C5515 2/1/2016
    0:09 C5515 2/1/2016
    0:06 C5021 2/1/2016
    0:05 C2939 2/1/2016
    0:06 C6166 2/1/2016
    0:04 C5515 2/2/2016
    0:06 C5515 2/2/2016
    0:05 C2936 2/2/2016
    0:21 C2936 2/2/2016
    0:05 C5021 2/2/2016

    I understand that I need to convert the time values into a decimal value in order to add those values since you can't use the Totals button for Date/Time values in Access, but I'm ashamed to say I don't understand any of the very few questions I've found about this topic on-line. Of course, once I've been able to convert the Short Time values into decimal and totaled them, I'll need to convert them back to Short Time format once again.

    I hope that I've presented my problem in a manner you can understand. Thanks again for any responses. 'preciate your attention.

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,426
    For a datetime field, time is stored as a decimal value representing number of seconds elapsed in a day divided by 86400 (the total number of seconds in a day). how it is presented is another thing altogether and to do with formatting.

    So if your time values are stored as date time as you say, just add them together. Just be aware that when adding them, once you reach 24 hours it will appear to return to zero since a day will have been added.

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

Similar Threads

  1. Replies: 4
    Last Post: 12-29-2015, 03:25 PM
  2. Replies: 6
    Last Post: 08-20-2014, 12:32 PM
  3. Replies: 11
    Last Post: 07-20-2014, 06:22 PM
  4. Replies: 1
    Last Post: 07-09-2014, 07:13 AM
  5. Replies: 3
    Last Post: 03-11-2014, 07:32 PM

Tags for this Thread

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