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

Latest 2 days but not restricted 2 days from now

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
I have this query (which is called from ASP)

Code:
RS.Open "Select PostDate, PostTopic, Post, Signature from Postings order by PostDate DESC", Conn, 1, 3

I want to change that query to only pull back the latest 2 days of records, I tried to do latest records 2 days from now, but that didnt return anything, so I want to return least something so I am wondering how to return the latest 2 days of postings from the recordset. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Where [Date()] - [PostDate] <= 2.

MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top