Thread: comparing dates
View Single Post
  #4 (permalink)  
Old Aug 28th, 2004, 12:39
benbacardi's Avatar
benbacardi benbacardi is offline
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
ok i get an error now...

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'cdate'
/ss/calendarhome.asp, line 226

but this is my code (RSgetall is a record set of the records in a database, edate is a text field with a date in it (in mm/dd/yy format)):

Code: Select all
thisdate = formatdatetime(RSgetall("edate").value,vbLongDate)
if (cdate(thisdate)) < Now() Then

'code in here

End if