Problem with Date Format

      Problem with Date Format

      In my Windows Embedded Compact 2013 system with ArmStone9 I need to set this date format:

      dd.mm.yyyy

      I have put an instruction like

      IFormatProvider fmt = new CultureInfo("it-IT");

      but gives the exception:

      PlatformNotSupportedException at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
      at System.Globalization.CultureInfo..ctor(String name)
      at ... etc etc

      In the PicoCom3 with Ce6 I don't have any problems with this instruction.
      I've put an attachment of the registry keys that I set in CE6 to override the default settings of the board, but doesn't work in WEC2013.

      What key registry I've to set in this 2013 system?

      Thanks
      Images
      • dtformat.png

        47.55 kB, 930×426, viewed 177 times
      Hello,

      did you tried "IFormatProvider fmt = new CultureInfo("it-IT", true);"?
      I am a bit confused about "PlatformNotSupportedException", These exception should not be thrown from "CultureInfo".
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Long story short, the only available and fully working CultureInfo is "en-US".
      I've tried with
      IFormatProvider fmt = new CultureInfo("it");
      and it doesn't give exceptions but when you inspect the properties
      fmt.DateTimeFormat.ShortDatePattern
      it gives the exception
      'fmt.DateTimeFormat' threw an exception of type 'System.NotSupportedException'
      while the en-US gives the correct answer "M/d/yyyy"
      Thanks,

      "NotSupportedException" is what i expect in this case."PlatformNotSupportedException" does misleading. I checked the "locals" and you are right only "en-US" is available at the time. We will resolve this with the next release (i put it to the roadmap).

      Hint: you can enumerate supported locals before use.
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Hello,

      maybe i oversee someting, but you list "time zones" not "locals" (culture codes).

      PS: assume something like this blog.opennetcf.com/2009/01/12/…in-the-compact-framework/
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      Post was edited 3 times, last by “fs-support_ZU” ().