>i'm creating a report that displays time in and out of all employee. i would like to put a remarks column where it would tell if the employee is tardy or halfday for that day.
>
>if the employee's time in is past 9AM, he is considered late.. and if he comes to the office after lunch, he is considered halfday. however these conditions may change in a year or so.
>
>what should i do to make my program as flexible as possible so that if rules have changed, i do not have to recompile my program again?
Evelyn,
You may want to create a table with 4 fields
DateFrom, DateTo, Hour1, Hour2
DateFrom is eg {{^1900/01/01}
DateTo is originally set to date(9999,12,31)
Hour1 is 09:00
Hour2 is 13:00
Should the rules change this year at say Christmas, then replace {^9999/12/31} with {^2003/12/25}, and add a record with eg ( {^2003/12/26}, {^9999/12/31}, 08:15, 09:15)
For each employee record you have to find which rule applies ( between(date, DateFrom, DateTo) ). This can easily be done with a select sql
Originally you will have one record only
Gregory