AnsweredAssumed Answered

Work Hours

Question asked by pfroelicher on Jul 11, 2018
Latest reply on Jul 13, 2018 by philmodjunk

Here in Brasil, workers have to log their hours.

We wrote a program, where one can punch in his PIN on an iOS device and a Timestamp with his name is created.

So.. Worker X has logged in today at 08:04, out on Lunch and in again and goes home at 18:17 .

If I use LIST( tsofsameday::ts) I get his four timestamps. He could have gone to the doctor and made more that 4 ins and outs.


11/07/2018 08:04:20

11/07/2018 12:07:52

11/07/2018 13:08:53

11/07/2018 18:17:28



Now.. I am looking for an elegant way to calculate WorkedHours within each Timestamp Record. For Worker X at 08:04 worked hours is zero.. growing as time passes, at 12:07 WorkedHours will be 04:03, at 13:08 time starts counting again.. You got it.

I need a function that either nows which Timestamp it is, an ENTRY or an EXIT... Or which position in the List.

I know I can get at each TS with GetValue (List(TsOfSameDay::ts)) and so forth..

Any ideas..