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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select based on date

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
When I execute the query:

SELECT StartTime, EndTime, MeetingID
FROM Meetings
WHERE Date=#2/12/2005#
ORDER BY StartTime;

It does not return any records even though there is a record with a matching date. If I change the query to match a date that is either today or in the past it works fine. Any ideas?

Thanks very much

Ed
 
Change the field name from "Date" to "MtngDate" or something like. "DATE" is a reserved word in Access. It might be causing the error.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
You may try either this:
WHERE Meetings.Date=#2005-12-02#
Or this:
WHERE Int([Date])=#2005-12-02#

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV thanks that has worked perfectly. Is that ANSI format or something?
 
This is a NON AMBIGUOUS format not too far from the ANSI one.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top