SharePoint DateTime Format and Regional Settings

Now, how exactly do you control the DateTime string representation and formatting in a SharePoint application?

Normally, in an ASP.NET Web Application, it depends on the Regional Settings (Control Panel -> Regional and Language Options) of the user running the application pool of the site. Unless you override the Culture options in the code.


So when I tried to ‘localize’ the DateTime representation for my SharePoint site, by changing the app pool user’s Regional settings, at first I was surprised it didn’t do the job. DateTime was still shown in the default en-US format.

This means SharePoint overrided the Regional settings of its application pool user. It took me a couple of minutes before I realized that for SharePoint applications, the DateTime formatting is controlled by opening the site -> Site Actions -> Site Settings -> Site Administration (column) -> Regional Settings

There, you have the option to fine tune the regional settings for the site, which will also affect the DateTime formatting.

After setting it to the one you desire, you save the settings and next time you open the site, DateTime will be formatted according to the locale you have selected.

Hope this helps!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: