I have the following
Single Table [ProductInfo]
PartNumb | Date | StartingTime | FinishingTime
121 | 9/7/2006 | 9/7/2006 12:07:05 AM | 9/8/2006 12:10:05 AM
122 | 9/7/2006 | 9/7/2006 09:11:05 AM | 9/8/2006 09:15:05 AM
123 | 9/8/2006 | 9/8/2006 12:07:05 AM | 9/8/2006 12:10:05 AM
124 | 9/8/2006 | 9/8/2006 09:11:05 AM | 9/8/2006 09:15:05 AM
I want to create a query that will select all fields from the previous day and beteen 12:00:00 AM and 08:00:00 AM.
So far I have;
SELECT *
FROM ProductInfo
WHERE DateValue(Date)=Date()-1
Which works fine for all records on that date... I'm stumped on the time thing.
Any help would be great.
Single Table [ProductInfo]
PartNumb | Date | StartingTime | FinishingTime
121 | 9/7/2006 | 9/7/2006 12:07:05 AM | 9/8/2006 12:10:05 AM
122 | 9/7/2006 | 9/7/2006 09:11:05 AM | 9/8/2006 09:15:05 AM
123 | 9/8/2006 | 9/8/2006 12:07:05 AM | 9/8/2006 12:10:05 AM
124 | 9/8/2006 | 9/8/2006 09:11:05 AM | 9/8/2006 09:15:05 AM
I want to create a query that will select all fields from the previous day and beteen 12:00:00 AM and 08:00:00 AM.
So far I have;
SELECT *
FROM ProductInfo
WHERE DateValue(Date)=Date()-1
Which works fine for all records on that date... I'm stumped on the time thing.
Any help would be great.