Results 1 to 6 of 6
  1. #1
    normie is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    53

    Hours to Pay


    I have two tables I want to query to come up with an employees pay
    The first table has a "hh:mm:ss" format and the other has a "currency" format
    I want to query the two tables (10:42:02 * $18.00)
    but cannot get the $ amount correct am I missing a step?

  2. #2
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    528
    in format $#,##0.00;($#,##0.00)
    And in decimal places ..... 2

  3. #3
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    528
    For example, you could use the following custom Currency format:
    $#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"
    This number format contains four sections separated by semicolons and uses a different format for each section

  4. #4
    normie is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    53
    I am still gettting the wrong total
    HOURS = 19:58 (Short Time) * RATE = $18.00
    the sum in the query is $17.78

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Time is stored as a fraction, where 12 hours is .5. Try multiplying your time value by 24 to get it into hours.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Setting the format property of a field or control does not change the actual value. Using Format function converts to a string. If you want to multiply with time part of a data/time value, convert it to decimal.

    x represents your field

    (CDbl(x)-Int(x)) * 18
    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: 1
    Last Post: 08-08-2012, 01:42 PM
  2. Replies: 4
    Last Post: 08-06-2012, 10:25 AM
  3. Can hours be sum?
    By newtoAccess in forum Queries
    Replies: 9
    Last Post: 10-10-2011, 11:01 PM
  4. Hours and OT Hours
    By Ruthers456 in forum Forms
    Replies: 2
    Last Post: 06-27-2011, 10:09 AM
  5. hours + condition
    By Miriam in forum Queries
    Replies: 0
    Last Post: 08-09-2009, 06:46 AM

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