IsDate Function

Tests if a numeric or string expression can be converted to a Date variable.

Sintaxe:

IsDate (Expresión)

Valor de retorno:

Bool

Parámetros:

Expression: Any numeric or string expression that you want to test. If the expression can be converted to a date, the function returns True, otherwise the function returns False.

Códigos de erro

5 Chamada de procedemento incorrecta

Exemplo:

Sub ExampleIsDate

Dim sDateVar As String

    sDateVar = "12.12.1997"

    print IsDate(sVarData) REM Devolve True

    sDateVar = "12121997"

    print IsDate(sVarData) REM Devolve False

End Sub