AnsweredAssumed Answered

Calculation Script  Steps help

Question asked by InvectusIlumni on Jun 24, 2010
Latest reply on Jun 24, 2010 by philmodjunk

Title

Calculation Script  Steps help

Post

Hi guys,

 

I've designed a punch card solution in FM10 to help employees clock in and out.

 

I have a calculation field (Hours_work) that outputs the payable work hours based information collected in a weekly report.

 

If no clock-in time and/or clock-out time is registered, I want the Hours_work field to output 0. How do I do that? Also, does anyone see any issues with my script steps below?. 

 

Here's the script:

Round(
(Hour( ClockOut_time - ClockIn_time )*60 + Minute( ClockOut_time - ClockIn_time)) / 60 - Hours_lunch;
2)
+
If(
GetAsNumber(ClockOut_time) <= GetAsNumber(ClockIn_time);
24;
0)

 

Round(

(Hour( ClockOut_time - ClockIn_time )*60 + Minute( ClockOut_time - ClockIn_time)) / 60 -

Hours_lunch;

2)

+

If

(GetAsNumber(ClockOut_time) <= GetAsNumber(ClockIn_time);

24;

0)

 

When the clock in time  is 5:29 PM and no clock-out time is specified, the Hours_work field outputs 6.52. That's wrong. How do I fix that?

 

Thanks a lot

 

 

 

 

 

Outcomes