Question about Isdate() function

M

MenuChen

Everytime I use the Isdate() function,I found that it runs
very slow.I use it to identify whether the user input a
datetime data or not.My Computer is ThunderBird 750,512M
SDRAM.
More,If the input date is in correct form ,like "2003-12-
2",this function runs very fast,and it will slow in
recognize the string "yyyy-mm-dd"(just a example that
doesn't contain number).
Who can help me,thanks.
Best Regards!
 
A

andrew

Is casting to date faster?
Try
CDate(StringToValidate)
Catch
MsgBox("Incorrect")
End Try
 
H

Herfried K. Wagner [MVP]

* "MenuChen said:
Everytime I use the Isdate() function,I found that it runs
very slow.I use it to identify whether the user input a
datetime data or not.My Computer is ThunderBird 750,512M
SDRAM.
More,If the input date is in correct form ,like "2003-12-
2",this function runs very fast,and it will slow in
recognize the string "yyyy-mm-dd"(just a example that
doesn't contain number).

Is 'DateTime.Parse' or 'DateTime.ParseExact' + catching exceptions
faster?
 

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