integer to time conversion off ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aryzona
    New Member
    • Jul 2020
    • 2

    integer to time conversion off ?

    I have a report that needs to track the total time spent on a project daily. I have converted the hours to minutes, and am using the Format([min] Mod, "\:00") to convert them to hours & minutes. One person has 360 min +420+420+450+27 0 = 1920 total minutes which divided by 60 = 32 hours --- the report shows a subtotal of 32.30 hours?? There are no extra decimal points in the integer it is set at 2 and only 2 can be entered. the 2 people on the report with a single entry roll up exactly. one has a total of 78 min which rounds up properly to 1:18 I am completely lost as to why the other one is so off?
  • strive4peace
    Recognized Expert New Member
    • Jun 2014
    • 39

    #2
    hi @Aryzona

    this is missing the second parameter for the MOD operator:

    [min] Mod ??

    perhaps you meant to put 60 there? that will give only minutes left

    Hours would be:
    [min]\60

    perhaps you want:
    Code:
    Format( [min]\60, "0" ) 
    & ":" 
    & Format( [min] Mod 60, "00" )
    ?

    Comment

    • Aryzona
      New Member
      • Jul 2020
      • 2

      #3
      yes .. i missed typing the 60 ...

      =Sum([tmin])\60 & Format([tmin] Mod 60,"\:00")

      is what i actually have.

      Comment

      • strive4peace
        Recognized Expert New Member
        • Jun 2014
        • 39

        #4
        missed your equation ... skip this

        Comment

        • strive4peace
          Recognized Expert New Member
          • Jun 2014
          • 39

          #5
          I see the problem!!!

          Comment

          • strive4peace
            Recognized Expert New Member
            • Jun 2014
            • 39

            #6
            you need to wrap both parts with SUM

            =Sum([tmin])\60 & Format( Sum([tmin]) Mod 60,"\:00")

            Comment

            Working...