Print Page | Close Window

CDate error in some posts

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10650
Printed Date: 08 April 2026 at 5:35pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: CDate error in some posts
Posted By: TheHawk
Subject: CDate error in some posts
Date Posted: 28 May 2004 at 11:35am

Hey i have just moved my forum to another server.

And now ive started getting this error in some of my posts:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'CDate'

/forum/forum/functions/functions_format_post.asp, line 839

But i realy cant figure out why... because the servere dident chance country or anything, and therefore no LCID change either.

As far as i can see, there posts/toppics showing this error is the topics where a posts have been edited, and as i can see the error is refering to the place in the code where the code checks the edit date in the post.

Does anyone know anyway of fixing this problem, i realy dont want to loose all the contents on my forum...




Replies:
Posted By: WebWiz-Bruce
Date Posted: 30 May 2004 at 8:03am
Looks like the server you have moved to is using a different time date setting and so is coursing this problem.

Your only solution is to turn off the feature in the admin area that displays who and when a post was edited.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: TheHawk
Date Posted: 30 May 2004 at 10:20am

Ive tried turning the "display edited" fuction off...

But the error still occurs...

Do you have any other ideas?



Posted By: WebWiz-Bruce
Date Posted: 30 May 2004 at 10:37am
The only solution left is to change the server so that the locale and time and date settings match that of your old server or try another host.

If you are running an older version try updating to the latest version as some changes where made to how topics where edited around last Christmas.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: TheHawk
Date Posted: 30 May 2004 at 10:55am

ok, but if i use the time settings from the old server. And they dont macth the ones on the new server, wont i get the CDate error in general then?

And im running 7.6, but ive tried downloading 7.8 and importing the old database into that one, but that dosent work either :(



Posted By: WebWiz-Bruce
Date Posted: 30 May 2004 at 11:43am
You should be running the latest version for a number of reasons including security or your forum will be vunerable to hackers!!!

The Access 7.8 version will run with any version 7.x Access database, all you need to do is replace the files leaving the Access database alone. (no importing required)


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: TheHawk
Date Posted: 30 May 2004 at 11:54am

Yes, and ive just updated to 7.8, and i know the thing about the database, i just used the word "imported" because of lack of other words to express what i ment. Sorry for the misunderstanding...

But anyways i still got that damn error, but well if there isent any way of fixing it, i just have to leave those posts alone or just delete them.

But if you come up with a way of fixing it, i would very happy.
But thx for ur help anyways...



Posted By: Semikolon
Date Posted: 30 May 2004 at 3:03pm
have you set a location id in common.asp? if not, try setting Session.LCID


Posted By: Gargaleo
Date Posted: 04 July 2004 at 4:30am

I got the same error after chamging the host of the forum!
As i see nobody here had a solution for this problem i opened "functions_format_post" and changed it a little and resolved the problem. infortunatelly when someone edit a post, it cant tell anymore the date and time it was edited but still says who did it.

Here is the code, all you have to do is coment the lines where inserts the date and time.
Im a asp noob, another solution is welcome.
Sorry for the awful english

'******************************************
'***        Display edit author  ***
'******************************************


'This function formats XML into the name of the author and edit date and time if a message has

been edited
'XML is used so that the date can be stored as a double npresion number so that it can display

the local edit time to the message reader
Function editedXMLParser(ByVal strMessage)

  'Declare variables
  Dim strEditedAuthor  'Holds the name of the author who is editing the

post
  Dim dtmEditedDate    'Holds the date the post was edited
  Dim lngStartPos  'Holds search start postions
  Dim lngEndPos  'Holds end start postions


  'Get the start and end in the message of the author who edit the post
  lngStartPos = InStr(1, strMessage, "<editID>", 1) + 8
  lngEndPos = InStr(1, strMessage, "</editID>", 1)
  If lngEndPos < lngStartPos Then lngEndPos = lngStartPos
  

  'If there is something returned get the authors name
  strEditedAuthor = Trim(Mid(strMessage, lngStartPos,

lngEndPos-lngStartPos))

  'Get the start and end in the message of the date the message was edited
  'lngStartPos = InStr(1, strMessage, "<editDate>", 1) + 10
  'lngEndPos = InStr(1, strMessage, "</editDate>", 1)
  'If lngEndPos < lngStartPos Then lngEndPos = lngStartPos

  'If there is something returned get the date the message was edited
  'dtmEditedDate = Trim(Mid(strMessage, lngStartPos,

lngEndPos-lngStartPos))

  'If it is a date then read convert it to a date otherwise set the variable to 0
  If isNumeric(dtmEditedDate) Then dtmEditedDate = CDate(dtmEditedDate)

Else dtmEditedDate = 0


  'Get the start and end position in the string of the XML to remove
  lngStartPos = InStr(1, strMessage, "<edited>", 1)
  lngEndPos = InStr(1, strMessage, "</edited>", 1) + 9
  If lngEndPos < lngStartPos Then lngEndPos = lngStartPos

  'If there is something returned strip the XML from the message
  strMessage = Replace(strMessage, Trim(Mid(strMessage, lngStartPos,

lngEndPos-lngStartPos)), "", 1, -1, 1)


  'Place the date and time into the message for when the post was edited
  If strEditedAuthor <> "" Then
   editedXMLParser = strMessage & "<span class=""smText""><br

/><br />" & strTxtEditBy & " " & strEditedAuthor & " </span>"
  End If

End Function



-------------
Do your best - GOD will do the rest


Posted By: Phat
Date Posted: 04 July 2004 at 9:12pm
Originally posted by Gargaleo Gargaleo wrote:


  'If it is a date then read convert it to a date otherwise set the variable to 0
  If isNumeric(dtmEditedDate) Then dtmEditedDate = CDate(dtmEditedDate)



You could try changing above to
If isDate(dtmEditedDate) Then dtmEditedDate = CDate(dtmEditedDate)

or

If isDate(dtmEditedDate) Then dtmEditedDate = FormatDateTime(dtmEditedDate,0)



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