O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

IsDate Function

Syntax

IsDate(expression)
expression

Use: Required

Data Type: Any.

Variable or expression containing a date or time.

Return Value

Boolean (True or False).

Description

Determines whether a variable’s value can be converted to a date.

Rules at a Glance

If the expression passed to IsDate is a valid date, True is returned; otherwise, IsDate returns False.

Programming Tips and Gotchas

  • IsDate uses the locale settings of the current Windows system to determine whether the value held within the variable is recognizable as a date. Therefore, what is a legal date format on one machine may fail on another.

  • IsDate is particularly useful for validating data input.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required