Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 4th, 2004, 07:36 AM
guymclaren's Avatar
guymclaren guymclaren is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Nelspruit South Africa
Posts: 179 guymclaren User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 1 m 21 sec
Reputation Power: 4
Cany anyone help with this script please

The script is as follows

<% @LANGUAGE = VBScript %>
<%
Option Explicit
Response.Expires = 0
%>
<!-- #include file="constants.asp"-->
<%
Dim objRS, strQ, datCurrent, datList, datList2
datCurrent = Date()
datList2 = DateAdd("d" , -1 , datCurrent)
datList = DateAdd("d" , +30 , datCurrent)

strQ = "SELECT * FROM dates WHERE entry_date >#" & datList2 & "# AND entry_date <#" & datList & "# ORDER BY entry_date ASC"
Set objRS = objConn.Execute(strQ)
%>
<!-- #include file="../template/template.htm" -->
<!-- #include file="menu.asp" -->
<div id="divContent">
<%
Response.Write " The date today is " & datCurrent & " The items listed here are from after " & datList2 & " until " & datList
While Not objRS.EOF
Response.Write ContTable
Response.Write "<tr><td>"
Response.Write "" & objRS("entry_date") & "&nbsp;&nbsp;&nbsp;&nbsp;"
Response.Write "<a href=""viewdiary.asp?code=" & objRS("entry_id") & " "" class=""menu"">"
Response.Write "<font color=""#ff0000"">" & objRS("entry_name") & "</font></a>"
Response.Write "&nbsp;&nbsp;&nbsp; " & objRS("entry_location") & "<br></td></tr>"
Response.Write "<tr><td bgcolor=""#f6f6f6"" align=""center"" valign=""middle"">"
Response.Write "" & objRS("entry_description")
Response.Write "</td></tr><tr><td align=""right"">"
Response.Write "<a href=""viewdiary.asp?code=" & objRS("entry_id") & " "">"
Response.Write "<font color=""#ff0000""> Click here for further details</font></a>"
Response.Write "</td></tr></table>"
Response.Write "<img src=""../images/buttons/rule.gif"" " & RuleSize & ">"
objRS.MoveNext
Wend

objRS.close
objConn.close
Set objRS = Nothing
Set objConn = Nothing
Response.Write Copy
Response.Write "</td></tr></table>"

%>
</div>

The results are as follows, Can any one tell me why? I have tried using between but it made no difference. This works for a bit then starts giving me the result below. and then I want to throw myself down a sewerage pipe. Please help. See the dates, Why are the older dates still appearing.



The date today is 04/12/2004 The items listed here are from after 03/12/2004 until 03/01/2005 17/11/2004 VLU Barberton-tak Vergadering Barberton
Die VLU Barberton-tak hou sy volgende vergadering of Nov 17 by die Hervormde Kerk om 9:00Click here for further detailshttp://www.webtech.co.za/lowveldnet...uttons/rule.gif 17/11/2004 VLU Eden-tak Vergadering Eden Nelspruit
Die VLU Eden-tak hou sy volgende vergadering of Nov 17 by die Schoemanskloof Boeresaal. Onthou om eetgoed en R20 se uitruilgeskenk to bringClick here for further detailshttp://www.webtech.co.za/lowveldnet...uttons/rule.gif 18/11/2004 Red Riding Hood - A Modern Wolf Tale Sabie
Red Riding Hood - A Modern Wolf Tale will be presented by ACTS at the Glynn Hall Theatre. Show starts 17:30 for 18:00, tickets available from Sabie Stationers & Tangles Hair Salon cost R30 adults & R15 children.Click here for further detailshttp://www.webtech.co.za/lowveldnet...uttons/rule.gif 18/11/2004 VLU Loerie-tak Vergadering Loerie Nelspruit
Die VLU Loerie-tak hou sy volgende vergadering of Nov 18 by die Zuma Gastehuis by Columbusstraat om 09:30. Koste beloop R30 en bring n uitruilgeskenk van R30 saamClick here for further detailshttp://www.webtech.co.za/lowveldnet...uttons/rule.gif 19/11/2004 Red Riding Hood - A Modern Wolf Tale Sabie
Red Riding Hood - A Modern Wolf Tale will be presented by ACTS at the Glynn Hall Theatre. Show starts 19:00 for 19:30, tickets available from Sabie Stationers & Tangles Hair Salon cost R30 adults & R15 children.Click here for further details

and so on untill

05/12/2004 Holistic Fair Nelspruit
Circle of light holistic fairClick here for further detailshttp://www.webtech.co.za/lowveldnet...uttons/rule.gif 09/12/2004 Spanish Evening White River
La Luz Studio of Spanish Dancing will hold a Spanish evening at the Meating Place in White River. It will include Spanish dancing, a three-course Spanish meal & music. Tickets cost R70 (pre-booked) or R80 (at the door). Booking is essential.Click here for further details

Reply With Quote
  #2  
Old December 16th, 2004, 04:45 AM
guymclaren's Avatar
guymclaren guymclaren is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Nelspruit South Africa
Posts: 179 guymclaren User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 1 m 21 sec
Reputation Power: 4
not that any one cares but i solved

the problem like this


Dim objRS, strQ, datCurrent, datList, datList2, entrydate
datCurrent = Date()
datList2 = DateAdd("d" , -1 , datCurrent)
datList = DateAdd("d" , +30 , datCurrent)

If isDate(datCurrent) Then
datCurrent = CDate(datCurrent)
End If

If isDate(datList) Then
datList = CDate(datList)
End If
strQ = "SELECT * FROM dates WHERE entry_date >= #" & datCurrent & "# ORDER BY entry_date ASC"
Set objRS = objConn.Execute(strQ)



While Not objRS.EOF
If isDate(objRS("entry_date")) Then
entrydate = CDate(objRS("entry_date"))
End If

If entrydate >= datCurrent AND entrydate <= datList Then
Response.Write ContTable
Response.Write "<tr><td>"

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Cany anyone help with this script please


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway