Working with Date Formats in SharePoint 2010

As you may or may not know, you can sometimes use the Regional Settings in SharePoint to present dates and currency type information in a format that is typical for your locale. For example, today (March 26, 2012) is typically presented as 26/03/2012 in Canada however in the US you might see 03/26/2012.

By default, my SharePoint Server install was utilizing an English (United States) locale. Therefore when I viewed any date based column on the server, the date would be displayed as MM/DD/YYYY.

However using the Regional Settings option, I can change these dates to follow my regional preference.

Changing Your Regional Settings

To change your Regional Settings, expand the drop down menu that appears to the right of your name as shown in the image below and select the My Settings option.

Select the My Regional Settings link. If you do not see this option, you may not be permitted to change your Regional Settings by your System Administrator.

By default, your profile will follow whatever settings have been defined for the current site you are visiting. However by deselecting the checkbox, you can specify your own preferences for items such as Locale, Time Zone, and Calendar as shown below.

By selecting English (Canada) and saving my changes, I can return to my site and the previously shown list will now be displayed using the date format of DD/MM/YYYY.

 

Changing a Site’s Locale

You can also tweak a specific site or site collection to follow a specific locale. So for example, you may have your Newfoundland and Labrador sales team site use an English (Canada) locale but your Texas based sales team site would use the English (United States) locale. To change the locale for a specific site, go to the Site Settings area and select Regional Settings from the Site Administration group of links.

 

But What About Other Formats That Are Not Regional?

Some organizations have adopted a format that is compatible with ISO 8601 as the standard format for dates. This format would present the above referenced date as 2012-03-26. This is very common for organizations that are multi-national or have adopted a more standardized approach to Document Management and Records Keeping. Unfortunately, out of the box, SharePoint doesn’t offer a very simple way to format all dates in this manner. However there are workarounds. As with all workarounds, you may want to ensure you have considered the long term impacts of such approaches when it comes to manageability and maintenance.

For such scenarios, you can create custom calculated columns within your content types (recommended) or lists to display the date in the format desired. For example, to display content in a format that is consistent with ISO 8601, I would create two custom columns to represent ISO Formatted Created Date and ISO Formatted Modified Date on my content types called “Organizational Document” and “Organizational Item” which act as the parent for all my custom content types. This allows me to make these columns available throughout my SharePoint environment on all my custom content types that inherit from these parents.

To do this, I created a calculated site column called “Creation Date” with the following settings:

And another called “Modified On” with these settings:

 

Then in my various views throughout my site collection, rather than displayed the default Created and Modified date values, I would use my custom columns as shown below.

SPTECHCON 2012 in San Francisco – Thanks for Coming Out!

A few weeks ago, I had the pleasure of heading down to San Francisco for the SPTECHCON conference. This was a great opportunity for me since I hadn’t spoken at this conference before and also because…well it was February and any place with a warm climate is a welcome change to the weather here in Newfoundland during February / March.

To make the trip even more worthwhile it was wonderful to see some of my old friends from the SharePoint world and meet some new ones. There really is no way to describe the value I get out of connecting face to face with other members of the SharePoint community. It is such a vibrant and exciting world to work in.

I presented two sessions while there so I figured I would share my slide decks on here even though I believe they were also hosted on the conference website.

  • SPTECHCON – Building a Records Management Practice
  • SPTECHCON – The Core Pillars of an Effective Document Management Solution (I even squeezed some pics of Gros Morne and Cape Spear in this one)
  • If you were there and I didn’t get to chat with you. Drop me a note as I always love to hear from people. Thanks to Cary J. Calderone for his kind words on his blog regarding my sessions. It always makes the long trip worthwhile when you see that people enjoyed your session like that.

    MOSS 2007 Records Management DoD 5015.2 Add-On Pack

    A couple of weeks ago, Microsoft announced the availability of their resource kit for the DoD 5015.2 Add On Pack for MOSS.  This add-on pack essentially is a set of features that gets added to the base Records Management features of MOSS for organizations that must run in a 5015.2 compliant state. 

    While the functionality is broken into a set of features, I should note that these features are very interdependant so it’s not like you can turn on 1 and not the others to selectively choose what functionality you want to take advantage of.  However recognizing the desire that many would have for such an option, the Records Management team did note on their blog that they would be releasing code samples in the coming weeks that should allow developers to identify how they can accomplish certain individual portions of functionality.  You can view the announcement article here.

    I personally have been diving deep in the area of Records Management over the past 3-4 months as it seems to be an area many of our customers that have previously deployed MOSS as an Intranet or Collaborative environment are now interested in.  It makes a lot of sense that organizations would eventually question investments into separate systems for producing, managing and sharing their content.  Providing a single environment and interface for the management and sharing of content throughout its entire lifecycle is a definite win / win for everyone in the organization.  I hope to post some helpful articles and posts over the next month or so in this area as it may be the easiest way for me to finally get back on the blogging train with something useful.

    If you have any specific suggestions of posts you would like to see, then leave me a comment here and I will do my best to get to it.