0

I have a desktop app in VS2010, I have defaulted culture to en-US in config file. Problem is: some of my app users have English (United States) but date format is dd/MM/yyyy wherein my app expect it to be in M/d/yyyy (as per US format). This is causing an issue to application.

Is it possible to mention format as M/d/yyyy in config file or any better work around? I had not expected to have non-US format when region is set to US.

Nikunj

DaveRead
  • 3,371
  • 1
  • 21
  • 24
  • *wherein my app expect it to be in M/d/yyyy* - how are you parsing this? You should remove the default culture from the config file and let the app use actual system regional settings for the UI. Parsing of user-entered values would work properly in that case. As for parsing (or writing) internal stuff like config files (or e.g. manually rendering XML files), you explicitly need to specify [`CultureInfo.InvariantCulture`](http://stackoverflow.com/questions/2423377/what-is-the-invariant-culture) to make sure the format is consistent. – vgru May 08 '14 at 13:59
  • In case of invariantculture, will it be English United States, in terms of date format? – Nikunj Thakkar May 08 '14 at 14:44

0 Answers0