Validate date values with IsDate() in Classic ASP

IsDate() returns True when VBScript can interpret a value as a Date and False otherwise. It is useful as one part of server-side validation.

Syntax

IsDate(expression)

Validate an actual Date value

Dim my_date
my_date = DateSerial(2007, 2, 28)
Response.Write IsDate(my_date)

The result is True.

Invalid date text

my_date = "February 29, 2007"
Response.Write IsDate(my_date)

For an English locale this returns False, because 2007 was not a leap year.

Locale note: ambiguous date strings such as 02/03/2026 can be interpreted differently under different server locales. When year, month and day arrive in separate form fields, validate them numerically and construct the value with DateSerial() instead of relying on an ambiguous string.

ASP Home






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer