IsDate is a visual basic function (6), try to use something like
Date.Parse(01:01:0_") or Date.ParseExact(01:01:0_") and see if you
still get the same error.
Because it can be parsed to #1:01:00 AM# (and it seems to think the date in
the sense you intend is 01/01/0001).
I suppose you could parse it with MyDate=CDate("01:01:0_") and if
MyDate.Year=1 then it was only a time without a date. Unless 1 is a valid
year in your application.
IsDate is a visual basic function (6), try to use something like
Date.Parse(01:01:0_") or Date.ParseExact(01:01:0_") and see if you
still get the same error.
It actually works. However, 'IsDate'/'CDate' of VB.NET are not compatible
to VB6's 'IsDate'/'CDate' functions/commands:
\\\
MsgBox(IsDate("11a")) ' 'True' in VB6, 'False' in VB.NET...
///
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.