How to Get the Current Date in SharePoint Calculated Column


Ahamed Fazil Buhari
SharePoint Developer
Published On :   27 Jun 2016
Visit Count
Today :  4    Total :   8925
Plan, Migrate, Secure, Report
SharePoint & Office 365 Tool. Simple & Easy to Use. 15-Day Trial!

SharePoint Office 365 Tool
Simple & Powerful Tool for Migration, Security & Reporting. Free Trial


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

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Categories

Migratiin Tools for SharePoint