Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering by time when format is mm/dd/yy hh:mm:ss

Status
Not open for further replies.

INTP

Technical User
Jan 4, 2003
42
0
0
US
I am trying to filter records between 6 and 8am for each day in november 2002. The problem is I can't figure out how to do this because the time field also includes the date. If I filter all from 11/01/02 6:00:00AM to 11/30/02 8:00:00AM wouldn't I be receiving records outside of the 6am-8am time range?

How would I separate the date form the time in the time field so that I can look at each record on each day between 6 and 8am.

i hope I am not to ambiguous here....
 
You need to select the Date and Year component of the Date as a first reference using Month() and Year() functions.

Then do the same using the time() function.

Bear in mind the change of time from 12:00:00AM TO
time(0,0,0). The On line Help on the Time Function is very useful.


Hope this helps
 

The following should get you want you want:

date({your.field}) in date(2002,11,1) to date(2003,11,31) and time({your.field})in time(6,0,0) to time(8,0,0) Mike

Before: After
[morning] [bugeyed]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top