A date within a date range

me1258

Registered User.
Local time
Today, 16:19
Joined
Apr 6, 2004
Messages
37
:confused:
This will be hard to explain.

I have an access program that will log punch in and punch out times.
I need to be able to create a new query or what ever to search for a how many people are punched in at a certain time over a given spread of dates.
example

the user wants to enter 13:00 the and the dates 01/01/2004 thru 01/30/2004
The program should search the database to see how many employees were punched in at 13:00 between those dates.

I thought is would be something like this

their search time was a variable called XTime


If XTime is > PunchInTime AND < PunchOutTime Then
count +1

I am unsure of how to do this if in a module or in a query or how the syntex will work. What I am trying to do is make a graph showing the peak times employees are at work. Not just punch in times.
Hope I explained this well enough
Thaks
 
Does your PunchInTime and PunchOutTime fields include both the Date and the Time?
 
Yes Date and Time

Yes

In another Query I do the date diff thing so if some one punches in at 23:30 on 01/01/2004 and punches out at 01:30 on 01/02/2004 it will count as 2 hrs not a - number.

so yes
Punch in and punch out are date/time togather.

Thanks for the reply
 
Still no answer

I still have no answer for this question. If anyone has any suggestions I would appreciate it.
Thanks :D
 

Users who are viewing this thread

Back
Top Bottom