I try to add to my ASP.NET Website new language support (English).
But all my dateTime format changed from
to
when I change language to "en-EN".
To solve it I write following code:
CultureInfo cultureInfo = new CultureInfo("en-EN");
cultureInfo.DateTimeFormat.FullDateTimePattern = "dddd, d MMMM yyyy 'y.'";
cultureInfo.DateTimeFormat.FullDateTimePattern = "dd MMMM yyyy 'y.'";
cultureInfo.DateTimeFormat.FullDateTimePattern = "d MMMM yyyy 'y.'";
cultureInfo.DateTimeFormat.DateSeparator = ".";
cultureInfo.DateTimeFormat.ShortDatePattern = "d.M.yy";
cultureInfo.DateTimeFormat.ShortDatePattern = "d.MM.yy";
cultureInfo.DateTimeFormat.ShortDatePattern = "dd.MM.yyyy";
System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo;
System.Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo;
But my dateTime format still like d\M\yyyy
.
What is wrong? Please help!