Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2010
    Posts
    10

    Converting HH:MM to decimal

    What is the formula for a query to convert time that shows up in HH:MM format to make it show up in decimal format??? Please help!!!!

  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,518
    Does TimeValue() do what you want?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Jul 2010
    Posts
    10
    I'm not sure, haven't tried that yet. Let me try now.

  4. #4
    Join Date
    Jul 2010
    Posts
    10
    OK, that doesn't work. I want the time to appear as a decimal number not the HH:MM format. The report I am doing is for showing how much time someone has worked on something.

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by katrinanyc926 View Post
    OK, that doesn't work. I want the time to appear as a decimal number not the HH:MM format. The report I am doing is for showing how much time someone has worked on something.
    if you want a mathematics approach, just use operations. what decimals do you want? what's the basis for the data? DAYS? HOURS? MINUTES?

    for example, a field that is DATE/TIME type as shows a value of 12:38 (12 hrs and 38 min), and your basis is HOURS, do this to the field in your sql:
    Code:
    select clng(left(FIELD2) & round((right(FIELD2) / 60), 2)) 

  6. #6
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I think you have the hours in a number field. So simply change the format of the textbox to General in the report .

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

Similar Threads

  1. Decimal seperator between different languages
    By seshan in forum Programming
    Replies: 3
    Last Post: 01-31-2010, 03:03 PM
  2. 12 Zeros past decimal
    By WhatnThe in forum Access
    Replies: 24
    Last Post: 01-03-2010, 09:53 PM
  3. many decimal places in calculated fields
    By GordS in forum Access
    Replies: 1
    Last Post: 02-04-2009, 11:12 AM
  4. Non programer needs help in decimal numbers
    By Peter O in forum Access
    Replies: 1
    Last Post: 10-07-2008, 12:29 PM
  5. Get the sum of decimal values - weird results
    By BengtCarlsson in forum Queries
    Replies: 2
    Last Post: 02-10-2006, 04:29 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