siru2803
asked on
Problem with date comparision in asp
I have code like this where i need to display the records valid till yesterday
I am getting error can u please
I wnat to disply the records who date is equal or before today
<%str=date()
set rsspl=server.CreateObject( "adodb.rec ordset")
rsspl.Open "select resid from tbl_onlinespecialmaster group by resid where enddate < "&str&" ",con,3,3
'if
do while not rsspl.EOF
%>
<%set rsname=server.CreateObject ("adodb.re cordset")
rsname.open "select resname from tbl_restaurantmaster where resid="&rsspl("resid")&"", con,3,3
%>
<b><font class=pagetext>
<a href="http://<%=ipadd1%>/resdetai l.asp?resi d=<%=rsspl ("resid")% >" class=full><%=rsname("resn ame")%></a >
</font></b>
<%set rscuisine=server.CreateObj ect("adodb .recordset ")
rscuisine.Open "select cuisine from tbl_rescuisine where resid="&rsspl("resid")&"", con,3,3
do until rscuisine.EOF%>
<font class=pagetext><%=rscuisin e("cuisine ")%>
<%rscuisine.MoveNext
loop
rscuisine.Close
set rscuisine=nothing
%>
I am getting error can u please
I wnat to disply the records who date is equal or before today
<%str=date()
set rsspl=server.CreateObject(
rsspl.Open "select resid from tbl_onlinespecialmaster group by resid where enddate < "&str&" ",con,3,3
'if
do while not rsspl.EOF
%>
<%set rsname=server.CreateObject
rsname.open "select resname from tbl_restaurantmaster where resid="&rsspl("resid")&"",
%>
<b><font class=pagetext>
<a href="http://<%=ipadd1%>/resdetai
</font></b>
<%set rscuisine=server.CreateObj
rscuisine.Open "select cuisine from tbl_rescuisine where resid="&rsspl("resid")&"",
do until rscuisine.EOF%>
<font class=pagetext><%=rscuisin
<%rscuisine.MoveNext
loop
rscuisine.Close
set rscuisine=nothing
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.