If the attendance is not punched in, how can I count the number of times the employee has not punched out in the current month if the employee's punching data is recorded in table? At the beginning, I thought like this: If I had to punch in four times a day, then 4 * the total number of times of punching in the current month, and then I used the total number of times-the number of times that I had punched in but not punched in. However, I found a problem. Our company takes a break every Monday, that is to say, the total number of times of punching out the Monday time, but some months have four Monday, in some months, there are five attendance questions that do not have to be punched in.
If some employees forget to record the data in table A, how can I count the number of times that employees do not have A record in the current month? At the beginning, I thought like this: If I had to punch in four times a day, then 4 * The number of days in the current month = the total number of times of punching in, then use the total number of times of punching in again-Number of punched in records = number of times of not logging in.
However, I found a problem. Our company takes a break every Monday, that is, the total number of times of punching out the Monday time, but in some months there are four Monday, and in some months there are five Monday, if that month is 4 Monday, the total number of times of punching is reduced by 16. if that month is 5 Monday, it will be reduced by 20 times, how can I determine how many Monday is there in the current month?
------ Solution ----------------------
(Number of days per month-(7-the value of the week on the first day)/7
An integer is the number of valid weeks.