473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Creating a query with current day but a standard time

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
2 1422
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
16
by: chudson007 | last post by:
I have a table, TableA with amongst other fields, a field for Qty. Qty can range from 0 to 100. How do I count the number of rows with a qty between 1 and 10, 11 and 20, 21 and 30, and so on using...
3
by: Greg | last post by:
I am trying to figure out how to create a report that will return orders current, over 30, over 60, over 90, and over 120. In one table I have Cust_Code, INV_Date, INV_Due_Date, INV_Bal and in...
2
by: SF | last post by:
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...
6
by: Martin Lacoste | last post by:
Ok, before I headbutt the computer... don't know why when I add criteria in a query, I get an 'invalid procedure call'. I also don't know why after searching the help in access, the various access...
5
by: Mike Turco | last post by:
What is the difference between creating relationships in the front-end vs. the back-end database? I was trying to create a relationship in a database front-end and noticed that I could not check...
9
by: VenuGopal | last post by:
Hi, why n++ executes faster than n+1..... or does it realli execute faster? thanks Venugopal.B
12
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without...
4
by: Chris | last post by:
Hello, I am attempting to build a MS SQL query that will return data from "today"; today being current day 8:00AM-10:00PM today. My goal is to return the data from a table that is written to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.