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

Is it possible to request only data that is from a given period?

Status
Not open for further replies.

WuCOng

Technical User
Apr 20, 2001
37
0
0
GB
I have a table that has the field &quot;date_created&quot;. I want to be able to pull data that was only created between date X and date Y on to the screen via ASP. The user is supposed to choose the from and to dates via two <select> lists.

Can it be done?
 
If the table is in ACCESS

querry=&quot;select * from MyTable where date_created between #&quot;&date_start&&quot;# and #&quot;&date_end&&quot;#&quot;

If the table is in SQL

querry=&quot;select * from MyTable where date_created between '&quot;&date_start&&quot;' and '&quot;&date_end&&quot;'&quot;

Hope this helps u. ________

George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top