IsDate - function of language VBScript

Returns a Boolean value indicating whether an expression can be converted to a date.

In the PROMOTIC system it is better to use Pm.IsValid(Pm.ToNumber(expression))

or Pm.GetVarType (in the JavaScript language, the Date data type does not exist, therefore the Double data type is used unstead).

Boolean IsDate(Variant expression)
expression(Variant) Date or text string that represents a date or time
Return values:
true - If the expression is a date or if can be converted to a valid date
false - Otherwise
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.
VBScriptSelect and copy to clipboard

Dim MyDate, YourDate, NoDate, bCheck
MyDate = "October 19, 2021"
YourDate = #10/19/17#
NoDate = "Hello"
bCheck = IsDate(MyDate)  'Returns true
bCheck = IsDate(YourDate)  'Returns true
bCheck = IsDate(NoDate)  'Returns false
PROMOTIC 9.0.15 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice