Visual Basic function IsDate depends on Current Culture.

I was puzzled when VB function IsDate(20/02/2006) returned false( in Australia date format is dd/mm/yyyy).


After investigation using Reflector I found that it uses  Thread.CurrentThread.CurrentCulture and my ASP.NET application wasn’t set to use AU culture by default. Using CurrentCulture does make sense, but it is not documented in MSDN. 


 

Advertisements