By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,056 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,056 IT Pros & Developers. It's quick & easy.

How to determine # of employees who worked during a time interval

P: 1
Hi. My goal is to create a database where I can extract the number of employees who have worked during each one hour interval in a 24 hr day (00:00 - 1:00, 1:00 - 2:00,...11:00 - 11:59).

tEmployees contains the employees Punch in & outs for a given month. My problem is tracking the overnight employees working PM > AM. My whole design might be wrong, I'll take any feedback/design tips. Thanks
Jul 5 '12 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 15k+
P: 31,494
It's hard to comment on a design when you don't share it Dan ;-)
Jul 5 '12 #2

P: 2
At least we could know what you're using. Let's see it Dan.
Jul 7 '12 #3

ariful alam
P: 185
if your database table has fields like below:

emp_name, emp_time_of_work, details

you have to make an query that takes parameter for emp_time_of_work like "between [full date/time format of now] and [full date/time format of now - 1]"
and you can run it in 1 hour tread to execute the query.
Jul 7 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.