Print Page | Close Window

Needs Help with Code for Calendar

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=12942
Printed Date: 30 March 2026 at 11:01pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Needs Help with Code for Calendar
Posted By: Misty
Subject: Needs Help with Code for Calendar
Date Posted: 12 December 2004 at 1:44am

I am having problems with a calendar that I set up on

http://www.bethedenmbc.org/calendar.asp -

Here's my code (the bolded parts of the code are significant):

[Code]

'Set connection details

SqlString = "Select * From Calendar"

Set rs = Server.CreateObject("ADODB.Recordset")

rs.Open sqlString, connectionString, adOpenDynamic, adLockOptimistic

%><%

Dim dtToday, nIndex

dtToday = Date()

Dim dtCurViewMonth ' First day of the currently viewed month

Dim dtCurViewDay ' Current day of the currently viewed month

Dim frmDate ' Date submitted by form

Dim tmpMonth

Dim tmpyear

Dim tmpDate

Dim mnth

Dim CurDate

' if the GO button was used, build the date from the month and year

If InSt




Replies:
Posted By: dpyers
Date Posted: 12 December 2004 at 10:34am

Gives me the invalid date message for any date, not just 2/05.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: ljamal
Date Posted: 12 December 2004 at 2:07pm
IT's expecting a date for the passed "date" variable. The form is passing CURDATE_YEAR and CURDATE_MONTH

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: Misty
Date Posted: 12 December 2004 at 3:02pm
Can someone please help me with passing the appropriate date value? I am lost on this. I understand that CurDate passes the year and month.


Posted By: Misty
Date Posted: 14 December 2004 at 1:59am
I finally got the calendar to work. I didn't use a querystring. There is a little problem with the calendar. If you go to January 2010, it will show you an older date. It is because I set the calendar to only go 5 years from today's date.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net