MetroToday
MIS
I am trying to search for a date from my Access datebase.
The field name is 'DateFrom' and is in ShortDate format in Access.
I have a date search text field setup in ASP. And I am using the correct date format in it, still when I search for a date that does exist in ASP, it does not return anything from the database.
Below is the relevent code.
Code for the Form Part:
<FORM ACTION="SearchResults.asp?UID=<%=Server.URLEncode(Request.QueryString("UID")%>" NAME=frmDate METHOD=post>
DATE <INPUT TYPE="Text" name="Date" size = 10>
<INPUT TYPE=submit Value="Submit">
</form>
Code for the Searched results page is:
If Len(trim(Request.Form("Date")) > 0 Then
SQLtxt = "SELECT * FROM tbldata WHERE _
DateFrom=" & (Request.Form("Date")
End If
Now is there some type of date function I need to put?
The field name is 'DateFrom' and is in ShortDate format in Access.
I have a date search text field setup in ASP. And I am using the correct date format in it, still when I search for a date that does exist in ASP, it does not return anything from the database.
Below is the relevent code.
Code for the Form Part:
<FORM ACTION="SearchResults.asp?UID=<%=Server.URLEncode(Request.QueryString("UID")%>" NAME=frmDate METHOD=post>
DATE <INPUT TYPE="Text" name="Date" size = 10>
<INPUT TYPE=submit Value="Submit">
</form>
Code for the Searched results page is:
If Len(trim(Request.Form("Date")) > 0 Then
SQLtxt = "SELECT * FROM tbldata WHERE _
DateFrom=" & (Request.Form("Date")
End If
Now is there some type of date function I need to put?