Use IsDate() to Check Valid Dates

 <%@ Language=VBScript %>

Check For Valid Dates

<%Dim strDateDim strMonthDim strDayDim strYearstrMonth = Request.Form("Month")strDay = Request.Form("Day")strYear = Request.Form("Year")strDate = strMonth & "/" & strDay & "/" & strYearIf IsDate(strDate) then Response.Write strDate & " is a valid date!"Else Response.Write strDate & " is not a valid date!"end if%>
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: