IsDate Variable Testing Function

IsDate Variable Testing Function
The IsDate function is CRITICAL for anybody who works with dates. This helps ensure that the dates are fully valid before being operated on or put into databases.

Many database calls will completely croak if you feed them an invalid date. So be sure to check before you try to insert that row!

If StartDate is your date variable, then your syntax would be:

ValidDate = IsDate(StartDate)

if ValidDate = FALSE then
response.write "Sorry, try again!"
end if

Variable Testing Functions

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.

Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map

Content copyright © 2023 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.