T
Tsair
I set the thread culture in MAIN() as below in order to show the date in
format DAY/MONTH/YEAR, but the datagridview alway show the date in M/d/yyyy.
How to set the default Date format from windows xp control panel by C#
coding or is that any way to set the application date format to d/M/yyyy
without change the windows xp regional setting ?
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false );
Thread.CurrentThread.CurrentCulture.DateTimeFormat.DateSeparator = "/";
Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern =
"d/M/yyyy";
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberGroupSeparator = ",";
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator =
".";
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
format DAY/MONTH/YEAR, but the datagridview alway show the date in M/d/yyyy.
How to set the default Date format from windows xp control panel by C#
coding or is that any way to set the application date format to d/M/yyyy
without change the windows xp regional setting ?
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false );
Thread.CurrentThread.CurrentCulture.DateTimeFormat.DateSeparator = "/";
Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern =
"d/M/yyyy";
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberGroupSeparator = ",";
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator =
".";
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;