'Problem calculating employee hours work time
I have a problem when I want to calculate Number of employee hours I got this issue,
I used TIMEDIFF TO Calculate number of hours and calculate correctly in myphpadmin
But when I tested in my website it comes like this enter image description here This for my payroll for sloma a 100$ per hours and for the attendance he worked 9 hours
even when i try to see how many hours for each employee it showed to me like this enter image description here
bellow is my SQL table for attendance
CREATE TABLE `attendance` (
`id` int(11) NOT NULL,
`employee_id` int(11) NOT NULL,
`date` date NOT NULL,
`time_in` time NOT NULL,
`status` int(1) NOT NULL,
`time_out` time NOT NULL,
`num_hr` time NOT NULL AS (TIMEDIFF(time_out, time_in)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
I'm still a beginner so bear with me :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
