Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Needs Help with Code for Calendar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Needs Help with Code for Calendar

 Post Reply Post Reply
Author
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Topic: Needs Help with Code for Calendar
    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. Please go to the bottom of the calendar. Click on February and 2005 and then submit the Go button. You will see that it is not working properly. Can someone please help me to fix this code?

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

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.