Promotic
WikipediaLinkedInYoutubeTwitterFacebook

IsDate - function of language VBScript

Description:
Returns a Boolean value indicating whether an expression can be converted to a date.
Syntax:
IsDate(expression As Variant) As Boolean
Calling:
b = IsDate(expression)
Parameters:
expression(Variant) any date expression or string expression recognizable as a date or time
Return Values:
true - if the expression is a date or can be converted to a valid date
false - otherwise
Note:
In OS Windows, the Range of valid dates is from January 1, 100 A.D. to December 31, 9999 A.D. The range vary among operating systems.
Example:
Dim MyDate, YourDate, NoDate, bCheck
MyDate = "October 19, 2016": YourDate = #10/19/16#: NoDate = "Hello"
bCheck = IsDate(MyDate) ' Returns true
bCheck = IsDate(YourDate) ' Returns true
bCheck = IsDate(NoDate) ' Returns false
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice