how to sum up the total worked hours in access query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shas1928
    New Member
    • Jan 2012
    • 3

    #1

    how to sum up the total worked hours in access query

    HI

    i have one column in a query which give total worked hours in the format like 09:00, 08:53.. How can I sum up all those
    hours ,
    for eg;
    emp id date in out total worked
    122 12/1/2011 09:10 18:00 08:50
    122 12/2/2011 08:30 18:10 09:40
    ------
    18:30

    or is it ok it could be done in reports..but how?

    i am very new to access. and thanks in advance

    shas
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    First you need to supply the field type for all fields involved.

    Comment

    • shas1928
      New Member
      • Jan 2012
      • 3

      #3
      Hi TheSmileyCoder

      thanks for your replay

      the query is for calculating the difference between login time and log out from the table "punching"

      punching table
      emp id number employee id
      login general date
      logout general date

      total time query


      SELECT [punchng].[emp id], [punchng].login, [punchng].[log out], Sum([punchng]![log out]-[punchng]!login) AS [Total worked]
      FROM punchng
      GROUP BY [punchng].[emp id], [punchng].login, [punchng].[log out];


      the total worked field type is "short time"

      thanks
      shas

      Comment

      • shas1928
        New Member
        • Jan 2012
        • 3

        #4
        I have got the answer from http://office.microsoft.com/en-us/ac...001110218.aspx
        thanks

        Comment

        Working...