/home/web-programming/asp/

ASP isDate Function

The ASP isDate() function is used to check if a string contains a valid date.

isDate Function Arguments

String to be tested

ASP Coding for isDate Function

<%

isDateString = #12/12/12#
If isDate(sDateString) Then

Response.Write "Yes"

Else

Response.Write "No"

%>


Result

Yes

isDate Functions Results
isDate(#12/12/20#) Yes
isDate(#12/12/2020#) Yes
isDate(12/12/20) No
isDate(12/12/20) No