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

Database Query

Status
Not open for further replies.

StaceyK

Programmer
Mar 12, 1999
2
US
I am using the Database Region Wizard to run a query on a table in an Access database. The table field I must query off in Access is a Date/Time field in Short Date format (3/12/99). Unfortunately, the FrontPage text box I created needs to send a date formatted result to the asp script to run the Select query from Access. Since I cannot figure out how to have the text form field convert the date the user enters in to an actual Date/Time format that Access understands I am getting a Data Type Mismatch error. If I run the query on a text field in Access it works fine. Any suggestions on converting a text date to a valid date format?? The trick being that the date the user enters is always going to vary.
 
Have you tried doing the comparison using date to char/char to date functions to make both fields character fields for comparison purposes?<br>
<br>
Im trying to create the same kind of page. Its no problem to create a database region, but I havnt a clue how to get a date range from a user to run the query agains. Ive read everything I can find on the subject, but nothing is clear on how to get the user input.<br>
<br>
good luck.<br>
bob<br>

 
Thanks for replying. My solution ended up being using a LIKE statement. The user enters a date to query on and my code simply says - SELECT * FROM change WHERE DateEntered LIKE '%%%DateEntered%%%' AND WorkCompDate Is Null AND "Completed?" = No AND ApprovedBy Is Null AND RejectedDate Is Null<br>
It works fine, however, it would not be a solution for a date range query though.<br>
<br>
Thanks for the response!<br>
Stacey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top