Question:
I must display a series of 'special offers', each of which have a date. However, i must only display those offers which have dates that are still valid (ie the offer is still running). I currently have the code which accesses the DB..
<% set conn = server.createobject("ADODB.connection")
conn.open "banking", "Aut2006", "assign2"
sql = "SELECT * from specialOffer"
set rs = conn.execute(sql) %>
and in the xhtml body have..
<%
If CDate(RS("fromDate")) <= CDate(Now) and CDate(RS("toDate")) >= CDate(Now)
Then
response.write ("<p class="specials"> = rs('ShortDesc')</p>")
end if
%>
But not working, could anyone help with this? Thanks
-Trez
I must display a series of 'special offers', each of which have a date. However, i must only display those offers which have dates that are still valid (ie the offer is still running). I currently have the code which accesses the DB..
<% set conn = server.createobject("ADODB.connection")
conn.open "banking", "Aut2006", "assign2"
sql = "SELECT * from specialOffer"
set rs = conn.execute(sql) %>
and in the xhtml body have..
<%
If CDate(RS("fromDate")) <= CDate(Now) and CDate(RS("toDate")) >= CDate(Now)
Then
response.write ("<p class="specials"> = rs('ShortDesc')</p>")
end if
%>
But not working, could anyone help with this? Thanks
-Trez