Question about Isdate() function

  • Thread starter Thread starter MenuChen
  • Start date Start date
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!
 
Is casting to date faster?
Try
CDate(StringToValidate)
Catch
MsgBox("Incorrect")
End Try
 
* "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?
 
Back
Top