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!

SQL Syntax Help

Status
Not open for further replies.

kmattera

Technical User
Dec 7, 2004
9
US
I am trying to figure out the proper Syntax for displaying a listing of dates that include today's date up to a certain date range. For example, I want to display any item that is between September 1 - September 30, 2006, but ONLY list anything current, nothing prior to today's date. make sense?

Here's what I've tried, but its not working.. .

SELECT Events.ID, Events.Event_Name, Events.Date, Events.Description, FROM Events WHERE Events.Date >= #"& date() &"# AND Between #09/01/2006# And #10/01/2006# ORDER BY Events.Date ASC
 
SELECT ID, Event_Name, [Date], Description
FROM Events
WHERE [Date] Between Date() And #2006-09-30#
ORDER BY 3

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