Pretty large project | just a little stuck.. there's lots of rules

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • Answered

I'm going to shorten this as much as i can because there is way too much to show.
So i'm creating a way to calculate Hours Worked/8hrs a day basically

i just need to figure out a rule, if i get this 1st part done the rest is easy im just stuck right now.

so there are 4 Fields ( ill try to show make it make more sense)

                               A                                B

                 |   Hour Assigned        |   Hours Clocked           |   OOA
 ___________________________________________________
                      In                 Out     |     In              Out
      1st      | 12:30 pm - 12:45 pm | 12:32 pm - 12:47 pm   |     2   (Should Show this, but shows 0)

 ( each time is a separate Field)


i have Created 4 fields Called | 1stInA  |  1stOutA | 1stInB  |1stOutB

i want to make it so there difference between  1stInB & 1stOutB is always 15mins

 So far i only have this:
( ToMinutes( [1stOutB] - [1stOutA] ) ) + ( ToMinutes( [1stInB] - [1stInA] ) )

That's what i came up without the use of IF then, the problem was that it kept giving me a 0

i want to make it if the time on B side is under 12:30pm (1stInB) it will count and if its above the 12:30pm (1stInB) it doesnt count and make 12:45 pm (1stOutA) count if its over and doesnt count if its under. hopefully all of this makes sense...

So if 

                               A                                B

                 |   Hour Assigned        |   Hours Clocked           |   OOA
 ___________________________________________________
                      In                 Out     |     In              Out
      1st      | 12:30 pm - 12:45 pm | 12:25 pm - 12:40 pm   |     5


i really hope there is solution to this, ill keep working on it but i really think i hit a brick wall here...









 
Photo of Mikail Kote

Mikail Kote

  • 84 Points 75 badge 2x thumb
  • hopeful to find a solution

Posted 3 months ago

  • 0
  • 1
Photo of Everett Patterson

Everett Patterson

  • 762 Points 500 badge 2x thumb
The If statement will help, try something like this

If([1stInB]<[1stInA], ToMinutes([1stInB]-[1stInA]), ToMinutes([1stOutB]-[1stOutA]))

Photo of Mikail Kote

Mikail Kote

  • 84 Points 75 badge 2x thumb
thank you :D. that was perfect.