VBScript IsDate function
VBScript IsDate
VBScript IsDate() function returns a boolean value if input specified is date.
Syntax
IsDate(expression)
VBScript Example
<!DOCTYPE html> <html> <body> <script language="vbscript" type="text/vbscript"> document.write("Example 1 : " & IsDate("Jan 01, 2025") & "<br />") document.write("Example 2 : " & IsDate(#11/11/11#) & "<br />") document.write("Example 3 : " & IsDate(#11/11/11 11:11 AM#) & "<br />") document.write("Example 4 : " & IsDate("Date") & "<br />") </script> </body> </html>
Output :
After running above script in IE we will get following output -
Example 1 : True Example 2 : True Example 3 : True Example 4 : False