Between TIme Query

robk5787

Registered User.
Local time
Today, 14:17
Joined
Sep 24, 2002
Messages
29
Hey Folks,
I am trying to filter out records throughout a 24 hour period using the times logged. The only problem is that all my records have a start and ending time. I probably could use just the start column since it will pull all the records within a time period. The major problem I am having is finding an expression to pull the times between a certain period in the day. For example, I have tried Between ("10:00:00 AM") And ("03:30:00 AM") and I keep getting a Data Mismatch error. I am very tired now, and I hope that this is a simple solution. Could someone please help me out here. Thanks!
 
robk5787 said:
I have tried Between ("10:00:00 AM") And ("03:30:00 AM") and I keep getting a Data Mismatch error.

That's because times are not strings which is what you are effectively treating it as with that criteria. Dates/Time are enclosed with these (#)

i.e.

Between #10:00:00# And #03:30:00#

If you are not storing a date within that same field then I venture that you are going to have problems.
 
Thanks, That is exactly what I needed. Funny how it all makes sense now. I recall something like that being in the help! I guess being awake at 3:00 AM can do things like that. Graveyard shift!

I appreciate the help!!
 

Users who are viewing this thread

Back
Top Bottom