Hi,
I'm working on a software which displays dates and times, using Calendars or grid.
I'm trying to display them the same way the user sees them in its system clock, at lower-right corner of the screen.
I'm on a french PC, which usually displays dd-mm-YYYY. In regional options, in tab "Formats", I've changed the Format to "English (UK)", and the first format (short date) to yyyy-MM-dd.
The clock now displays 2014-07-07, but when I try to get this format string through :
- System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern
- System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern
... the framework only gives me dd-MM-yyyy.
What's wrong with this code ? How can I retrieve the string that is displayed in the config. panel ?
Thank you in advance for any help.