Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   Display hours greater than 24 in a dataReport (https://www.askmehelpdesk.com/showthread.php?t=185142)

  • Feb 17, 2008, 06:01 PM
    kabia
    Display hours greater than 24 in a dataReport
    I have a DataReport that extracts the data from a .MDB
    It shows what times people have worked in minutes...

    Here is part of my query to the DB:

    (`Total_Hours`-(`Break_Time` + `Lunch_Time`))/1440 As RHours

    In the DataReport the RptTextBox format is "Hh:Nn"

    This works fine for hours less than 24...
    When I come to the RptFunction to Total the hours, it will not display greater than 24 hours.
    I can not find a Format the will show the desired result.
    For Access it is "[h]:mm"

    Any help would be greatly appresciated.

    Thank you in advanced.
  • Aug 27, 2008, 08:44 AM
    jakester
    Quote:

    Originally Posted by kabia
    I have a DataReport that extracts the data from a .MDB
    It shows what times people have worked in minutes.....

    here is part of my query to the DB:

    (`Total_Hours`-(`Break_Time` + `Lunch_Time`))/1440 As RHours

    in the DataReport the RptTextBox format is "Hh:Nn"

    This works fine for hours less than 24...
    When i come to the RptFunction to Total the hours, it will not display greater than 24 hours.
    I can not find a Format the will show the desired result.
    For Access it is "[h]:mm"

    Any help would be greatly appresciated.

    Thank you in advanced.

    Instead of using 1440 in the denominator, plug in the amount of hours in minutes that you are looking to evaluate

    For example, if the workweek you are considering has 40 hours in it, multiply 60 minutes by (5*24) to get 7200. Plug 7200 into the denominator and you'll get the answer in hours you are considering.
  • Aug 27, 2008, 04:05 PM
    kabia
    Quote:

    Originally Posted by jakester
    instead of using 1440 in the denominator, plug in the amount of hours in minutes that you are looking to evaluate

    for example, if the workweek you are considering has 40 hours in it, multiply 60 minutes by (5*24) to get 7200. Plug 7200 into the denominator and you'll get the answer in hours you are considering.

    It's early in the morning so I might be taking you the wrong way... but...
    (`Total_Hours`-(`Break_Time` + `Lunch_Time`))/1440 As RHours 'is originally in minutes'
    EG: ( 480 -(15+30))/1440

    And I am trying to convert it to hh:mm with the option of getting a calculation > 24:00 for calculating a whole weeks worth of minutes...

    Thank you for replying though, I appreciate it.

  • All times are GMT -7. The time now is 09:55 PM.