B
Bob Day
The IsDate code below should result in False, instead it throws the
exception below. Why? How do I check if a string can be converted to a
date if this function does not work properly?
Bob
code:
Dim blnDate_Valid As Boolean = True
Dim x As String = "Hello"
blnDate_Valid = IsDate(x)
Should result in False, but throws exception:
A first chance exception of the type System.FormatException occurred in
mscorlib.dll.
Additional information: the string was not recognized as a valid datetime.
There is a unknown word starting at index 0.
exception below. Why? How do I check if a string can be converted to a
date if this function does not work properly?
Bob
code:
Dim blnDate_Valid As Boolean = True
Dim x As String = "Hello"
blnDate_Valid = IsDate(x)
Should result in False, but throws exception:
A first chance exception of the type System.FormatException occurred in
mscorlib.dll.
Additional information: the string was not recognized as a valid datetime.
There is a unknown word starting at index 0.