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

Selecting records within a certain date?

Status
Not open for further replies.

ProjectX

Programmer
Oct 7, 2002
11
GB
Lo all,

I want to list all records within a certain date period from a recordset in dreamweaver MX. (eg between 05/10/02 - 07/10/02 ) I'm using ASP for the server script & access for the database.

Anyone have any ideas?

thanks
 
[tt]Are you having problems writing the syntax or you need the syntax. [wavey]
[tt]
[sup]"The only ideas that will work for you are the ones you put to work."[/sup]
[/tt]

 
i need the syntax for a recordset query if possible
or ASP code if it has to be that way

any example will do

thanks
 
Try this, you will need to put in your own variables and table names etc you might need to change the &'s to +'s

mySQL = "SELECT * FROM yourtable WHERE yourdatefield > '#"
mySQL = mySQL & firstDateVariable
mySQL = mySQL & &quot;#' AND < '#&quot;
mySQL = mySQL & secondDateVariable

Cheech The secret of life is honesty and fair dealing. If you can fake that, you've got it made.
Groucho Marx (1895-1977)
 
What's the field format on access ? by your example, it must be short date

You can use Cheech's exaple
[tt]
[sup]&quot;The only ideas that will work for you are the ones you put to work.&quot;[/sup]
[/tt]

 
think the format is as above.. will try cheech's statement, thanks a lot :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top