[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Problem with date comparision in asp

Posted on 2006-04-20
3
Medium Priority
?
168 Views
Last Modified: 2013-12-23
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.recordset")
                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.recordset")
                rsname.open "select resname from tbl_restaurantmaster where resid="&rsspl("resid")&"",con,3,3
                %>
                <b><font class=pagetext>
                <a href="http://<%=ipadd1%>/resdetail.asp?resid=<%=rsspl("resid")%>" class=full><%=rsname("resname")%></a>
                </font></b>
                <%set rscuisine=server.CreateObject("adodb.recordset")
                rscuisine.Open "select cuisine from tbl_rescuisine where resid="&rsspl("resid")&"",con,3,3
                do until rscuisine.EOF%>
                <font class=pagetext><%=rscuisine("cuisine")%>
                <%rscuisine.MoveNext
                loop
                rscuisine.Close
                set rscuisine=nothing
                %>
0
Comment
Question by:siru2803
1 Comment
 
LVL 20

Accepted Solution

by:
hes earned 2000 total points
ID: 16509413
Where are you getting the error ?
If it is on this line
<<rsspl.Open "select resid from tbl_onlinespecialmaster group by resid where enddate < "&str&" ",con,3,3>>
You need to change it to
rsspl.Open "select resid from tbl_onlinespecialmaster group by resid where enddate <= '"&str&"' ",con,3,3

Added the = and a single quote aroung the date
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question