判断是否是日期的函数
返回布尔值
Function IsDateVar(Var1)
On Error Resume Next
IF VarType(CDate(Var1))<>7 Then
IsDateVar=False
Else
IsDateVar=True
End IF
End Function
VarType函数的相关解释
http://www.
Function IsDateVar(Var1)
On Error Resume Next
IF VarType(CDate(Var1))<>7 Then
IsDateVar=False
Else
IsDateVar=True
End IF
End Function
IF IsDateVar(rs("name"))=True Then
Response.Write "是日期格式"
Else
Response.Write "不是日期格式"
End IF