Home
%3CLINGO-SUB%20id%3D%22lingo-sub-582763%22%20slang%3D%22en-US%22%3EThe%20default%20short%20date%20format%20for%20English%20(Canada)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-582763%22%20slang%3D%22en-US%22%3E%3CP%3EBeginning%20with%20%3CSTRONG%3EWindows%20Server%202012%3C%2FSTRONG%3E%20and%20%3CSTRONG%3EWindows%208%3C%2FSTRONG%3E%2C%20the%20default%20short%20date%20format%20for%20English%20(Canada)%20was%20changed%20from%3CCODE%3Edd%2FMM%2Fyyyy%3C%2FCODE%3E%20to%20%3CCODE%3Eyyyy-MM-dd%3C%2FCODE%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMicrosoft%20is%20not%20planning%20to%20revert%20this%20change%20as%20%3CCODE%3Eyyyy-MM-dd%3C%2FCODE%3E%20is%20the%20recommended%20date%20format%20by%20The%20Government%20of%20Canada.%20However%2C%20there%20is%20no%20legislation%20about%20it%20so%20other%20formats%20are%20also%20used%20in%20different%20contexts.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1737923269%22%20id%3D%22toc-hId-1737923334%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--814233692%22%20id%3D%22toc-hId--814233627%22%3EWorkaround%3C%2FH2%3E%0A%3CP%3EIf%20this%20format%20change%20caused%20an%20issue%20in%20your%20application%2C%20a%20quick%20fix%20is%20that%20changing%20the%20date%20string%20before%20using%20it%20in%20the%20application%3A%3C%2FP%3E%0A%3CP%3E%3CCODE%3Estring%20displayOnPage2%20%3D%20Calendar1.SelectedDate.ToString(%22dd%2FMM%2Fyy%22)%3B%3C%2FCODE%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20%3CCODE%3ECultureInfo%3C%2FCODE%3E%20class%2C%20you%20can%20also%20change%20the%20short%20date%20pattern%3A%3C%2FP%3E%0A%3CP%3E%3CCODE%3ECultureInfo%20ci%20%3D%20CultureInfo.CreateSpecificCulture(%22en-CA%22)%3BDateTimeFormatInfo%20dtfi%20%3D%20ci.DateTimeFormat%3B%3C%2FCODE%3E%3C%2FP%3E%0A%3CP%3E%3CCODE%3Edtfi.ShortDatePattern%20%3D%22dd%2FMM%2Fyyyy%22%3B%20%3C%2FCODE%3E%3C%2FP%3E%0A%3CP%3E%3CCODE%3Estring%20displayOnPage1%3D%20Calendar1.SelectedDate.ToString(%22d%22%2C%20dtfi)%3B%3C%2FCODE%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-928576643%22%20id%3D%22toc-hId-928576708%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--1623580318%22%20id%3D%22toc-hId--1623580253%22%3EAlternative%20Solution%3C%2FH2%3E%0A%3CP%3EYou%20can%20also%20solve%20this%20issue%20by%20changing%20the%20server%E2%80%99s%20Region%20settings.%20However%2C%20as%20many%20developers%20and%20system%20administrators%20don%E2%80%99t%20want%20to%20change%20server%20settings%2C%20my%20recommendation%20would%20be%20making%20a%20code%20change%20instead%20as%20explained%20above.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20363px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F114187i289D82AD9D630DD3%2Fimage-dimensions%2F363x409%3Fv%3D1.0%22%20width%3D%22363%22%20height%3D%22409%22%20alt%3D%225.jpg%22%20title%3D%225.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-582763%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22margin%3A%200cm%200cm%207.5pt%200cm%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2013.5pt%3B%20font-family%3A%20%26amp%3Bquot%3B%20color%3A%20%236b6b6b%3B%22%3EWindows%20language%20packages%20store%20country%20specific%20settings%20such%20as%20date%20formats.%20I%20have%20recently%20came%20across%20an%20issue%20that%20was%20related%20to%20an%20update%20in%20Canada%E2%80%99s%20language%20package.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-582763%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDefault%20short%20date%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

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.

5.jpg