Beginning with Windows Server 2012 and Windows 8, the default short date format for English (Canada) was changed from
Microsoft is not planning to revert this change as
yyyy-MM-dd is the recommended date format by The Government of Canada. However, there is no legislation about it so other formats are also used in different contexts.
If this format change caused an issue in your application, a quick fix is that changing the date string before using it in the application:
string displayOnPage2 = Calendar1.SelectedDate.ToString("dd/MM/yy");
CultureInfo class, you can also change the short date pattern:
CultureInfo ci = CultureInfo.CreateSpecificCulture("en-CA");DateTimeFormatInfo dtfi = ci.DateTimeFormat;
string displayOnPage1= Calendar1.SelectedDate.ToString("d", dtfi);
You can also solve this issue by changing the server’s Region settings. However, as many developers and system administrators don’t want to change server settings, my recommendation would be making a code change instead as explained above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.