s = "2010-11-5"
a = Split(s, "-")
If Val(a(0)) > 0 And Val(a(0)) < 9999 And Val(a(1)) < 13 And Val(a(1)) > 0 And Val(a(2)) > 0 And Val(a(2)) < 31 Then
response.write "- -"
End If
Function val(str)
val = sz(str)
While sz(str) = ""
str = Left(str, Len(str) - 1)
Wend
If Len(str) = 0 Then val = 0 Else val = sz(str)
End Function
Function sz(str)
On Error Resume Next
sz = CDbl(str)
End Function
function pd(val)
dim val,datestr,i
val=str
if len(var)=9 and isdate(var) then
if mid(var,5,1)="-" and mid(var,8,1)="-" then
return var
else
val=""
end if
end if
a="2000-01-01"
if IsNumeric(mid(a,1,4)) AND Mid(a,5,1)="-" AND mid(a,6,2)>0 AND mid(a,6,2)<13 AND Mid(a,8,1)="-" AND mid(a,9,2)>0 AND mid(a,9,2)<32 then
...