bmwmpower
04-15-2003, 02:34 PM
i have data base and i want search by date
in my database the record for date
Dateadded = this is the format 23/03/2003
and this is my code
<select name="Dateadded">
<option value="<%=Request("Dateadded")%>"><%=Request("Dateadded")%></option>
<option value="">All</option>
<%
Do While Not myrecsource2.EOF
%>
<option value="<%=myrecsource2("Dateadded")%>"><%=myrecsource2("Dateadded")%></option>
<%
myrecsource2.MoveNext
Loop
%>
</select>
======================================
this is the code for search where the problem
If Not IsEmpty(Request("Dateadded")) Then
If IsNumeric(Request("Dateadded")) Then
'Add to query
'First item so we don't have to test for WHERE
blnWhere = True 'Set where to true
sql = sql & "WHERE "
sql = sql & "(Dateadded = " & CStr(CLng(Request("Dateadded"))) & ") "
End If
End If
in my database the record for date
Dateadded = this is the format 23/03/2003
and this is my code
<select name="Dateadded">
<option value="<%=Request("Dateadded")%>"><%=Request("Dateadded")%></option>
<option value="">All</option>
<%
Do While Not myrecsource2.EOF
%>
<option value="<%=myrecsource2("Dateadded")%>"><%=myrecsource2("Dateadded")%></option>
<%
myrecsource2.MoveNext
Loop
%>
</select>
======================================
this is the code for search where the problem
If Not IsEmpty(Request("Dateadded")) Then
If IsNumeric(Request("Dateadded")) Then
'Add to query
'First item so we don't have to test for WHERE
blnWhere = True 'Set where to true
sql = sql & "WHERE "
sql = sql & "(Dateadded = " & CStr(CLng(Request("Dateadded"))) & ") "
End If
End If