IsDate doesn't work properly in VB.net 2008 -- What else can I use?
Posted on 2009-05-16
Okay, So I have a CSV, basicly it has different functions. I just converted from VB6 to .net 2008, However.. There are some difficulties with the IsDate function now.
Isdate in VB6 would come back true if:
And I think some basic ones like May 05, 2008, or something like that.
Anyways. The string its searching can have different formats, thus I need to CHECK to make sure it is a date, this was great in VB6, however, .NET returns a string like 05/05/2008 05:05:02 to FALSE. I am not sure why either.
Basicly the function coding was basic for it:
If validfound = -1 Then
For i = 0 To UBound(marray)
If IsDate(marray(i)) Then
validfound = i
And it was fine, but now I am having issues. any suggesetions so that it works for all dates and if theres a time included for that too?
It can however use short or long dates too, like 5/5/2008 or 05/05/2008 or 5/5/08, for example.. Stuff like that. Was okay previously.