• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Default short date format change for English (Canada)


Brink

Administrator
Administrator
mvp
Posts
23,632
#1
Beginning with Windows Server 2012 and Windows 8, the default short date format for English (Canada) was changed from dd/MM/yyyy to yyyy-MM-dd.

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.

Workaround

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");

For CultureInfo class, you can also change the short date pattern:

CultureInfo ci = CultureInfo.CreateSpecificCulture("en-CA");DateTimeFormatInfo dtfi = ci.DateTimeFormat;
dtfi.ShortDatePattern ="dd/MM/yyyy";
string displayOnPage1= Calendar1.SelectedDate.ToString("d", dtfi);


Alternative Solution

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.

:arrow: How to Change Date and Time Formats in Windows


Source: The default short date format for English (Canada)
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    250GB Samsung 960 EVO M.2,
    256GB OCZ Vector,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Arris SB8200 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Lumia 1520 phone

Users Who Are Viewing This Thread (Users: 0, Guests: 1)