Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date

Status
Not open for further replies.

parsok

Technical User
Sep 17, 2001
20
US
I have a field called LoggedAt. It has the date/time people connect to our system. It is in this format, 4/15/2002 1:34:00 PM. I need to do a query, where users may sort by date. For example, someone may want to know everyone who has connected to our system for 5/1/2002. How do I do this?
 
The example you've presented is little different
from asking NorthWind to list the customers
who placed orders on a particular date. The fact
that your date field contains both date and time
information comes into play only if you're including
time criteria in your query.

Try copying/pasting this to a new query in NorthWind,
then run the query. It's fairly forgiving - when it asks
for a date, you can type 08/11/94, 8/11/94, 8 Aug 94,
08-Aug-94, and you should get a response.

Once you have this up and running, you can adapt
it to your particular situation.

PARAMETERS [enter order date] DateTime;
SELECT Customers.CompanyName, Orders.OrderID, Orders.OrderDate
FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID
WHERE (((Orders.OrderDate)=[enter order date]));

Bob
 
I copied this into NorthWind database. It does great! However the NorthWind database does not have the time and date together in one field. Am I missing how this applies to my situation?

I appreciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top