Re: Searching a database -
07-09-2004
, 06:30 PM
Thanks,
I understand now about declaring variables
It is giving a different error now though
Syntax error converting datetime from character string.
/adv_search_results.asp, line 67
Could i maybe do this instead
get value form user via a dropdown menu so if they want to seadcrh by
yesterdays dates they select 1 or day before that select 2 then send to
variable Get_User_date
so we say
dim Get_User_date
dim Value_to_serarch
if Get_User_Date = 1 then
Value_to_search = <%=DateAdd ("d", -1, Date())%>
else if Get_User_Date = 2 then
Value_to_search = <%=DateAdd ("d", -2, Date())%>
etc..........
myDateVariable =
Month(Value_to_search)&"/"&Day(Value_to_search)&"/"&Year(Value_to_search)
so its getting date when it is still in Datetime format and not a character
String from variable Value_to_search.
If this can be done is the Month(Value_to_search) syntax correct or does it
need ?? or ?? with it.
Thanks for being patient with a very slow learner.
Adam |