I am new to Access and I am trying to query data from the night shift guys. I'm trying to pull data from the previous days starting at 6:00PM to 6:00AM the next day.
any help would be greatly appreciated
I am new to Access and I am trying to query data from the night shift guys. I'm trying to pull data from the previous days starting at 6:00PM to 6:00AM the next day.
any help would be greatly appreciated
Try:
Between Date()-1 & " 18:00:00 " And Date() & " 06:00:00"
as the criteria in your date field.
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
You can use the fact that dates are stored as double numbers and you want a quarter of a day back and forward...
Code:SELECT * FROM TableName WHERE CDbl(DateField) Between CDbl(Date()-0.25) And CDbl(Date()+0.25);