I\'m working on localizing a website in French. However I am not supposed to change the date format to French. It must remain as per en-us format even if the culture is set
Thanks Guys !!!! Seems like your sugessions are working for me. I tried creating a custom culture which extends the features of fr-ca and changes its date format to en-us. Here is the code
CultureInfo ci = new CultureInfo("fr-ca");
DateTimeFormatInfo dateformat = new DateTimeFormatInfo();
dateformat.FullDateTimePattern = "ffffdd, mmmm dd, yyyy h:mm:ss tt";// Date format of en-us
ci.DateTimeFormat = dateformat;
CultureAndRegionInfoBuilder obj = new CultureAndRegionInfoBuilder("fr-ca", CultureAndRegionModifiers.Replacement);
obj.LoadDataFromCultureInfo(ci);
obj.Register();
Once the code registers new fr-ca, the date format of the fr-ca will be same as that of en-us. The code can be used in Page_Load.