Results 1 to 7 of 7
  1. #1
    albzn is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    12

    Question Elapsed time

    Hi,

    I want to save daily posts, and on each day I work different amount of time.


    If I work for one hour I want to write 1:00 and if I work for 20 minutes I want to write 00:20
    the problem is: When I creat query that sums everything up, the time behaves as a clock (quite obviously when you think about it). If I've work for 13h it'll say: 01:00.
    And I would like it to say 13:00.

    Is there a simple solution to this?

  2. #2
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    sounds like you're using a date field when you should be using a number field.
    I don't know of a quick way to convert a number to the format you want.
    You may need to total the right side numbers and divide by 60 and add the whole number to the hours with the remainder as the minutes.

  3. #3
    albzn is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    12
    Yeah, I was thinking the same and have tried it. To problem is the formatting, I just can't get it right.
    So I still need help with the formatting.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    How about showing readers some sample data and your sample calculations?
    Why do you want to store 1 hour duration as 1:00??
    Isn't it really 1 hour - not 1 o'clock.
    Code:
    1 hour = 60 minutes
    
    If you work 1 hour, then 20 minutes, your total time of work would be calculated as follows:
    
    --day 1 ---- 1 hour
    --day 2 ---- 20 minutes
    
    You need to get common units of measure
    1 hour = 60 minutes
    
    so day 1 --------------- 1 hour or  60 minutes
       day 2 --------------------------- 20 minutes
    =========================
     Total time worked ( in minutes)        80

  5. #5
    albzn is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    12
    Yes, you're right it is 1 hour. not 1 o'clock. But I would still like the formatting to be 1:00.
    Since it's easier to log the correct time then.
    It's much easier to write 1:30 than 1.5h.
    You get me?

  6. #6
    albzn is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    12
    bump please help meee

  7. #7
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Didn't you like orange's suggestion? If you're asking for more detail, in a table Hrs field and Mins field-
    data type Double, format 00.00, decimal places 2
    When you run a totals query, in a custom calculated field, multiply the sum of hours by 60, add the sum of minutes and divide the result by 60.
    You will have to set the custom field to be the same as the table in the query properties sheet if you want leading or trailing zeros.

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

Similar Threads

  1. calculate time elapsed
    By chavez_sea in forum Access
    Replies: 3
    Last Post: 07-29-2013, 09:21 PM
  2. Elapsed Time by Area
    By sathishj1981 in forum Queries
    Replies: 1
    Last Post: 03-20-2013, 02:08 AM
  3. HELP With Elapsed Time in Form
    By accessineedhelp in forum Forms
    Replies: 6
    Last Post: 09-01-2011, 10:30 AM
  4. HELP! Elapsed Time Difference
    By accessineedhelp in forum Access
    Replies: 5
    Last Post: 08-31-2011, 06:00 PM
  5. Time Elapsed Problem
    By leejqs in forum Reports
    Replies: 6
    Last Post: 07-16-2009, 07:58 AM

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