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.
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..