SharePoint Pals
 | Sign In
How to Get the Current Date in SharePoint Calculated Column
by Ahamed Fazil Buhari 27 Jun 2016
Author
SharePoint Developer
Visits   
Today  :   9     Total  :    3844

SharePoint Calculated Columns are one of the great OOTB feature to manipulate other columns in the list and produce an output based on the formula we provide. To look into the usage of formulas from MSDN, please click here

Here in this article we look into the approach how to create a calculated column which will hold the current date.

If we straight away go ahead and create the calculated column by applying the formula as [Today], like shown below. clip_image002

Then we will end up with an error saying 'Calculated columns cannot contain volatile functions like Today and Me.'

clip_image004

To overcome this error and to get the current date in our calculate column. There is a workaround for this, Please follow the below step by step approach.

Step 1: Create a Column with the name ‘Today’.

Open the ‘List Settings’ page and click on ‘Create Column’.

clip_image005

In the Column name text box, give the name as Today and let the type of the column is Single line of text.

clip_image006

Step 2: Create a Calculated Column and refer the Column which is created in Step 1.

Now, the Calculate column in which we want the current date needs to be created. Go to List settings -> Create Column. And give the name for the column and select Calculated in type of the column

clip_image008

In the formula section, just insert the column ‘Today’ which we created in Step 1 and select the data type returned from this formula is: Date and Time click OK.

clip_image010

Step 3: Delete the ‘Today’ column which was created in Step 1.

At last, just delete the column which was created in Step 1, named as Today.

clip_image012

Now you can see the current date in the Calculate column.

clip_image014

Please note that this calculate column will show the Current Date only if the item is edited otherwise it will show the last updated date, the Calculated col value won’t be updated automatically.

Happy Coding

Ahamed Buhari

blog comments powered by Disqus

SharePoint Pals

Pals
SharePoint Pals, a community portal for SharePoint developers, Administrators and End Users. Let's join hands and share the point together.
Read this on mobile

Training

Angular Js Training In Chennai
Advanced Angular Js training with real world developer scenarios
Angular Js, Web Api and Ionic for .Net Developers
All in one client side application development for .Net developers
Angular Js For SharePoint Developers
Get ready for the future. Its no more just C#

Get Connected

SharePoint Resources

SharePoint 2013 and 2010 Web Parts
Free Web Parts with Source Code for SharePoint Community




SharePoint 2013 Books and Tutorials
Collection of free SharePoint 2013 books and tutorials (eBooks, pdfs)

Supported By

Contribute your article and be eligible for a one month Free Subscription for Plural Sight. The Author of the most popular New Article (published in the previous month) will be awarded with a Free One month Plural Sight Subscription. Article can be sent to articles@sharepointpals.com in a word document.

Related Resources

Recent Tweets

Twitter January 15, 00:25
How To Enable Target Value And Actual Value In #D3 Gauge Chart https://t.co/VxSi4QnNrC

Twitter January 15, 00:24
How To Open #SharePoint List Hyperlink Column In Modal #Popup Window https://t.co/EQ7HkoZDkX

Twitter January 15, 00:24
Quick Introduction To #Asp.NetCore And It’s Features https://t.co/zAXObHCFpH

Twitter January 15, 00:22
How To Configure #PerformancePoint Services To Use Secure Store In #SharePoint 2013 https://t.co/LEwnUoI7EY

Twitter January 15, 00:21
How To Block Or Disable #Office365 Services https://t.co/Yvp2VPFIRP

Follow us @SharePointPals
Note: For Customization and Configuration, CheckOutRecent Tweets Documentation