DateTime issue when global culture of the server is different on different servers
My website is hosted on multiple servers at different locations Everywhere the Culture of the data format is different- we use mm/dd/yyyy format every where but incase some server has the culture set to dd/mm/yyyy then our website generates Datetime exception. You should be specifying what culture you want to use whenever you convert a string to a date. The culture you should be using depends on what culture the dates are formatted as. For example, if all dates you are parsing are formatted as Slovak : String s = "24. 10. 2011"; Then you need to parse the string as though it were in Slovak