I am making a timeclock program to keep track of hours worked. I'm trying to figure out the best way to calculate the hours worked in a week.
Here is the mysql table where the information is stored:
This data is tied into a datagridview. I just can't come up with the best way to add up the hours in the week.
Here is the mysql table where the information is stored:
Code:
+----+---------------------+--------+---------+------------+
| id | date_time | in_out | users | weekofyear |
+----+---------------------+--------+---------+------------+
| 34 | 2009-12-04 20:26:04 | 1 | mdowers | 49 |
| 35 | 2009-12-04 20:26:15 | 0 | mdowers | 49 |
| 36 | 2009-12-04 20:31:31 | 1 | mdowers | 49 |
| 37 | 2009-12-04 20:31:57 | 0 | mdowers | 49 |
+----+---------------------+--------+---------+------------+