date cast error in asp.net page

  • Thread starter Thread starter Robin
  • Start date Start date
R

Robin

In an asp.net page that uses a cast function to convert a date, the code
works in a development environment but in production it displays the
following error.

Cast from string "31/03/2005" to type 'Date' is not valid.

Both are Windows 2003 servers I have check the regional settings which are
both English (United Kingdom).

Are there any other settings that I need to check?
 
had a similar problem, works on my project with:

System.IFormatProvider format = new
System.Globalization.CultureInfo("en-UK", true);
DateTime.Parse("sting2Parse", format);
 
Back
Top