Currently I am developing a timekeeping system that requires it to display 15-increment time span for each employee in his/her timesheet/reports. This is what I've done in the SQL Server DB for looking up/display individual start/end time...
TimeClock Lookup table
Regular Decimal
12:15 AM 0.25
12:30 AM 0.5
12:45 AM 0.75
1:00 AM 1
1:15 AM 1.25
1:30 AM 1.5
When employee keys in their start/end time, I stored them in the decimal format (in Timesheet table), so I can easily determine the exactly time the employee worked. I used the TimeClock table to inner join with the timesheet table whenever I need to display the start/end time in the report/front end in the regular format.
Well...everything is cool but now the business users require the timekeeping system to have an increment of 6 seconds (instead of 15 minutes).
My questions to all of you are.... what is a good solution to handle this situation? Should I update the TimeClock table to the increment of 6 seconds? What if later on the business rule is changed again into a different time increment? Is there a better approach in designing this TimeClock lookup table? Hope this make sense to all of you. Thanks in advance.
TimeClock Lookup table
Regular Decimal
12:15 AM 0.25
12:30 AM 0.5
12:45 AM 0.75
1:00 AM 1
1:15 AM 1.25
1:30 AM 1.5
When employee keys in their start/end time, I stored them in the decimal format (in Timesheet table), so I can easily determine the exactly time the employee worked. I used the TimeClock table to inner join with the timesheet table whenever I need to display the start/end time in the report/front end in the regular format.
Well...everything is cool but now the business users require the timekeeping system to have an increment of 6 seconds (instead of 15 minutes).
My questions to all of you are.... what is a good solution to handle this situation? Should I update the TimeClock table to the increment of 6 seconds? What if later on the business rule is changed again into a different time increment? Is there a better approach in designing this TimeClock lookup table? Hope this make sense to all of you. Thanks in advance.