Showing posts with label Region. Show all posts
Showing posts with label Region. Show all posts

Monday 1 November 2010

SharePoint DateTime format is incorrect

Problem: The SharePoint DateTimeControl displays the date in US format i.e. 1033 or mm/dd/yyyy despite me changing the site collections regional settings.
Site Settings > Regional Settings > Locale > Select [English (United Kingdom)]

Inital Hypothesis: In MOSS changing the Locale did not change the format of the DateTimeControl. 
Resolution: This is still the case, you need to explicitly set the local on eash DateTimeControl.  You can set it to be the same as the site's local.
E.g. myDateTimeControl.LocaleId = SPContext.Current.Web.Locale.LCID 
Or set the "LocaleId"attribute of the SharePoint DateTime control
E.g. SharePoint:DateTimeControl runat="server" LocaleId="2057"

=========================
Tip: Changing the Regional settings will affect the curreny columns.

List of Locale's: http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx

====================