Hi,
I'm having issue to get the total number of hours work of the employee and if the employee is eligible to some allowances.
I have two columns in the table called Clock_in and Clock_out but the format is something like this
231000 (which is 11:10pm), etc.
I managed to resolved the issue on how to get the time format by using the formula below:
Clock_in:
numbervar Clock_INA := {CLOCK_IN};
stringvar CLOCK_INB := totext(Clock_INA,"000000");
time(val(left(CLOCK_INB,2)),val(mid(CLOCK_INB,3,2)),val(right(CLOCK_INB,2)))
Clock_out:
numbervar Clock_OutA := {CLOCK_OUT};
stringvar CLOCK_OutB := totext(Clock_OutA,"000000");
time(val(left(CLOCK_OutB,2)),val(mid(CLOCK_OutB,3,2)),val(right(CLOCK_OutB,2)))
My problem is when I'm doing the calculation to get the total number of work the result is NOT what I'm expecting..
eg1:
Clock_in: 190000
Clock_out: 230000
Total Number of work: 40000
eg2:
Clock_in: 093000
Clock_Out: 100000
Total Number of work: 170000
1. How can I convert 40000 to 4hrs? also how can I convert the 170000 to 1.5hrs?
2. How can I get the SUM of the Total Number of Work? (I'm trying to use the Summary (Insert -->SUmmary), but I cannot see the SUM option.
Appreciate your help!
I'm having issue to get the total number of hours work of the employee and if the employee is eligible to some allowances.
I have two columns in the table called Clock_in and Clock_out but the format is something like this
231000 (which is 11:10pm), etc.
I managed to resolved the issue on how to get the time format by using the formula below:
Clock_in:
numbervar Clock_INA := {CLOCK_IN};
stringvar CLOCK_INB := totext(Clock_INA,"000000");
time(val(left(CLOCK_INB,2)),val(mid(CLOCK_INB,3,2)),val(right(CLOCK_INB,2)))
Clock_out:
numbervar Clock_OutA := {CLOCK_OUT};
stringvar CLOCK_OutB := totext(Clock_OutA,"000000");
time(val(left(CLOCK_OutB,2)),val(mid(CLOCK_OutB,3,2)),val(right(CLOCK_OutB,2)))
My problem is when I'm doing the calculation to get the total number of work the result is NOT what I'm expecting..
eg1:
Clock_in: 190000
Clock_out: 230000
Total Number of work: 40000
eg2:
Clock_in: 093000
Clock_Out: 100000
Total Number of work: 170000
1. How can I convert 40000 to 4hrs? also how can I convert the 170000 to 1.5hrs?
2. How can I get the SUM of the Total Number of Work? (I'm trying to use the Summary (Insert -->SUmmary), but I cannot see the SUM option.
Appreciate your help!