Windows – Simple issue regarding date formats

asp.netiislocalizationwindows

We are hosting a website that when browsed to locally loads up fine but if you browse to it externally you get

Conversion from string "1/15/2010 8:46:01 AM" to type 'Date' is not valid.

What do I change on the server to fix this. When browsing the site on the server it works, although I am logged into the server as a different user to that in IIS.

Any ideas this is actually starting to cause a head ache now.

Best Answer

It's probably to do with the Locale you're using with the conversion. Maybe externally the UK format is being used, but internally the US format is used. Make sure you specify the exact format you're expecting when converting the string to a date.

Related Topic