By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Creating a query with current day but a standard time

P: n/a
SF
Hi,
I am very new to access and have been trying to create a query that
searches a table for a certain time range, that being from yesterday
at 8:00 AM to today at 8:00 AM. I have been able to get it to work by
day but, not day and time. Is there some way to take the Date() or
Now() functions and set their time to 8:00AM for example?
Thank You
Steve
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
sf*******@hotmail.com (SF) wrote in news:d302ba6f.0404121853.2dc0af90
@posting.google.com:
Hi,
I am very new to access and have been trying to create a query that
searches a table for a certain time range, that being from yesterday
at 8:00 AM to today at 8:00 AM. I have been able to get it to work by
day but, not day and time. Is there some way to take the Date() or
Now() functions and set their time to 8:00AM for example?
Thank You
Steve


select * from tbl where dateField between dateadd("h",8,date()) and dateadd
("h",8,date()+1)
Nov 12 '05 #2

P: n/a
SF
Ross Presser <rp******@NOSPAM.imtek.com.invalid> wrote in message news:<Xn**********************@129.250.170.88>...
sf*******@hotmail.com (SF) wrote in news:d302ba6f.0404121853.2dc0af90
@posting.google.com:
Hi,
I am very new to access and have been trying to create a query that
searches a table for a certain time range, that being from yesterday
at 8:00 AM to today at 8:00 AM. I have been able to get it to work by
day but, not day and time. Is there some way to take the Date() or
Now() functions and set their time to 8:00AM for example?
Thank You
Steve


select * from tbl where dateField between dateadd("h",8,date()) and dateadd
("h",8,date()+1)


Thank You, Very much appreciated.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.