Questions about attendance not punched in

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.