IsDate Error

E

EP

I just upgraded a V 6.0 app. to .Net. I keep getting an
error from a simple IsDate statement. Basically checking
to see if the value of a variable(vValue = "A2957") is a
date example - If IsDate(vValue)=False then The error
message is

"A first chance exception of 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."

Anyone seen this and know a way around it.
 
H

Herfried K. Wagner [MVP]

EP said:
I just upgraded a V 6.0 app. to .Net. I keep getting an
error from a simple IsDate statement. Basically checking
to see if the value of a variable(vValue = "A2957") is a
date example - If IsDate(vValue)=False then The error
message is

"A first chance exception of 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."

The code 'MsgBox(IsDate("A2957"))' returns 'False' on a .NET 1.1 machine.
 
F

Fergus Cooney

Hi EP, Herfried.

The code 'MsgBox(IsDate("A2957"))' returns 'False'

on <Herfried's> .NET 1.1 machine.

and also on my .NET Framework 1.0.

I suspect that something foul is afoot but have not a clue.

Regards,
Fergus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top