Access Report Calculations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aric Green
    New Member
    • Jan 2008
    • 23

    #1

    Access Report Calculations

    I just want to see if I am thinking about this correctly. I have a report that shows Time In, Time Out, And Total Time Seen. I have a text box down at the bottom that adds the Time Seen column on the report. I then formated the text box hh:nn to give me total hours and min spent with customers. All goes well until the time adds up to more then 24 hours. If I format the text box to dd:hh:nn it gives me one day less then if I add the times up on my own.
    Exp. 76 hours 4 min should give me 3 days 4 hours and 4 min. It is giving me 2 days 4 hours 4 min. Unformatted it gives me 3.1694444444444 4. I am guessing that access is using the 3 for the number of days. Is access starting with 0 when it counts the days.
    Exp. 0 = first 24 hours
    1 = second 24 hours
    2 = third 24 hours
    I just want to make sure that I am thinking about this correctly.
    I got it to give me the correct answer when I set the control source as follows.
    =([txtTotalTime]+1])
  • DonRayner
    Recognized Expert Contributor
    • Sep 2008
    • 489

    #2
    Originally posted by Aric Green
    I just want to see if I am thinking about this correctly. I have a report that shows Time In, Time Out, And Total Time Seen. I have a text box down at the bottom that adds the Time Seen column on the report. I then formated the text box hh:nn to give me total hours and min spent with customers. All goes well until the time adds up to more then 24 hours. If I format the text box to dd:hh:nn it gives me one day less then if I add the times up on my own.
    Exp. 76 hours 4 min should give me 3 days 4 hours and 4 min. It is giving me 2 days 4 hours 4 min. Unformatted it gives me 3.1694444444444 4. I am guessing that access is using the 3 for the number of days. Is access starting with 0 when it counts the days.
    Exp. 0 = first 24 hours
    1 = second 24 hours
    2 = third 24 hours
    I just want to make sure that I am thinking about this correctly.
    I got it to give me the correct answer when I set the control source as follows.
    =([txtTotalTime]+1])
    The unformated result is = (76.066666666 hours / 24). The 4 min has been converted to 10ths of hours.

    Hope this helps.
    Don

    Comment

    Working...