Problem with Dates

  • Thread starter Thread starter Paul Say
  • Start date Start date
P

Paul Say

I have a date stored in a database as a string in the format of dd/mm/yyyy

In my application this string is cast to a date as follows
myDate = ctype(stringDate,DateTime)

This works fine however when the date is 16/10/2003 for eg, on my machine
there is no problem but on another machine where the application is
installed a n error is thrown

System.InvalidCastException: Cast from string "10/16/2004" to type 'Date' is
not valid

I have tried entering the following lines in the web.config file however
this did not fix the problem to set the culture to australia however the
problem still occurs

<system.web>
<globalization culture="en-AU" uiCulture="en-AU"></globalization>

Is there somthing else I am missing.


Paul
 
Back
Top