Error on date since server crashed!

Results 1 to 2 of 2

Thread: Error on date since server crashed!

  1. #1
    Join Date
    Dec 1969

    Default Error on date since server crashed!

    Our server that hosts an intranet shut down the other day for no reason. After rebooting it the intranet keeps showing an error where a date script is run.<BR><BR>checked the server and all regional settings are UK (I am in the UK). All was working before this crash but not since. Any help is most appreciated. <BR><BR>The date script is:<BR><BR>&#060;% &#039;Start Date<BR> Dim TodayDate<BR> TodayDate = Split (FormatDateTime(Date,1),",",2)<BR> Response.Write ( TodayDate(1) )<BR> %&#062;"&#062;<BR><BR>and the error I keep getting is:<BR><BR>Microsoft VBScript runtime error &#039;800a0009&#039; <BR><BR>Subscript out of range: &#039;[number: 1]&#039; <BR><BR>/class/sop/SOP_colourseps.asp, line 1140 <BR><BR>I checked it was this date script by removing it and the page loaded fine.<BR><BR>please help.

  2. #2
    Join Date
    Dec 1969

    Default Well it appears that what this

    is doing is parsing the Day from the date, this is what my test is showing here anyway. This line:<BR><BR>FormatDateTime(Date,1)<BR>Returns this for me: Sunday, October 24, 2004 <BR><BR>Then you split it on the comma returning two elements and get:<BR>October 24, 2004 <BR><BR>I think you need to look at what you&#039;re getting back from that line of code. Comment out your split line and just response write out the FormatDateTime(Date,1) results. It&#039;s probably not returning what it should.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts