Share Pointers: Using Calculated Columns to Store Granular Date Information



Email    print   
April 15, 2009 —  (Page 1 of 1)
One of the key benefits of SharePoint is the ability to enter information once, and then view the data many different ways through the use of custom views. The views are created based off of the different list columns, and they can be configured through filtering and sorting to provide dynamic views of the data.

One of the most common requests I hear from people who are configuring views is the requirement to view information around dates in a more granular way. For instance, they may want to show all tasks group by the week they are due or show all documents that were uploaded for the month. Many times I find that to accomplish this, they have created additional list columns and require their users to enter the dates in a very granular fashion. While this works, end users don’t like that they have to enter the information in multiple formats.

An alternate approach would be using custom calculated columns that filter specific information out of an existing date column. This allows users to enter the date once and have it stored in multiple formats that can then be used for filtering and grouping the list data. Whenever the date referenced in the calculated field is modified, the calculated values will be updated to reflect the new value. Calculated fields are created by adding new list columns that use the calculated type and providing a custom formula. Some of the most common date formulas that I have used are as follows:

Name Formula Display Type Example
Year =TEXT(YEAR([Start Date]),"000") Single Line of Text 2009
Month =CHOOSE(MONTH([Start Date]),"01-January",
"02-February",
"03-March","04-April","05-May","06-June",
"07-July","08-August",
"09-September","10-October",
"11-November","12-December")
Single Line of Text 01- January
Week =[Start Date]+7-WEEKDAY([Start Date]) Date & Time, Date Only 2/2/2008
Weekday =TEXT(WEEKDAY([Start Date]),"dddd") Single Line of Text Monday

Using this approach allows you to provide a simple way for users to enter data that can then be presented to them in several different formats. Dates are just one example of what can be configured with calculated columns. The links below provide some additional information about calculated columns and can be used to help you get stared:

Jennifer Mason is a consultant with SharePoint 911.





Related Search Term(s): sharepoint


Share this link: http://sdt.bz/33419
 
Most Read Latest News Blog Resources

Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
Why SharePoint development is so damn special!
Bjorn Furuknap has a few words about the travails associated with getting just the right SharePoint setup Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Are you at risk for burnout?
Burnout is a severe problem and it can strike at any time. Here's how to tell if you are nearing the edge.
02/09/2012 02:16 PM EST

Agility, mom, and apple pie
If we're to evaluate the state-of-the-art in software development, we should start with the values espoused in the Agile Manifesto.
02/07/2012 11:57 AM EST

RIM woos developers with free tablet
How do you get more apps ported to the BlackBerry PlayBook? By giving every developer a free tablet, of course!
02/04/2012 01:57 PM EST

GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb