Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Searching a date range in a SQL statement

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-07 : 17:14:52
Justin writes "I want to query a database and return values within a date range, say between today and today - 30.

I tried using this :

SELECT Product_ID, Product_Name, Product_Desc, Product_Price, Product_Pic From tblProduct WHERE Product_Date BETWEEN "&Date&" AND "&DateAdd("d",-30,Date)

But it didn't seem to work. Any suggestions would be greatly appreciated...or dumb mistakes pointed out. Which ever.

Thanks!!

JP"
   

- Advertisement -