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

Report between to dates

Status
Not open for further replies.

germanrc

Programmer
Mar 9, 1999
7
0
0
US
I hope that someone gives me an answers. I have a simple database and one field is date type. All I need is show a report between to dates. This dates are collected from the user in two text box<br>I been trying with cr4.5, DRD<br>Thank you
 
The SQL would be something like:<br><br>&quot;SELECT * FROM MyTable WHERE MyDateField BETWEEN &quot; & txt1.text & &quot; AND &quot; & txt2.text & &quot;; &quot;<br><br>Depending on which DBMS you're using, you may have to surround the date parameters with pound-marks ('#').<br><br>Note that the BETWEEN comparison operator (at least in Oracle) doesn't include the endpoints.&nbsp;&nbsp;So if you're looking for dates between 3/1/00 and 4/1/00 you'll get values of 3/2/00...3/31/00<br><br>Chip H.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top