![]() |
|
|
#1
|
|||
|
|||
|
I need to selet events from a table that happen during a certain time period. The only problem is how do you do this when the time period involved is over two days?
In my table I have start time and end time. EX. Start Time/End Time 0630/0800 0800/0100 2300/0430 0400/0530 1200/1300 2200/2300 I want to select al the events that take place between 2200 and 0600. The following results should come back: 0800/0100 2300/0430 0400/0530 2200/2300 And help you can provide would be greatly appreciated. |
|
#2
|
|||
|
|||
|
Hello:
You need to figure in a date field some how and then calculate the difference between Now and the desired date. The following may help you: The DateDiff function displays the variance in days between the values of the OrderDate and ShippedDate fields. ' DateDiff("d", [OrderDate], [ShippedDate]) ' The DateAdd function displays a date that is 10 days before the value of the PromisedDate field. ' DateAdd("y", -10, [PromisedDate]) Regards Mark |
|
#3
|
|||
|
|||
|
I do have a date field, they are start day and end day.
Maybe I am missing your point but the query is not based off the date. I just need all the events over a certain period of time (ex. Between 2200 and 0600) regardless of the date. Any additional explanation or help anyone can provide would be greatly appreciated. Thank you |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Combining Two Queries | csolomon | Queries | 1 | 09-03-2009 11:33 AM |
| Crosstab Queries | albst130 | Queries | 0 | 03-07-2007 06:32 AM |
| Queries the max from two rows | mohsin74 | Queries | 0 | 12-14-2006 09:52 PM |
| VBA and stacked queries | Pudy | Queries | 0 | 11-28-2006 12:58 PM |
| Running Queries from a form | HaYuM | Queries | 0 | 06-13-2006 07:48 AM |