Using TODAY As a calculated column
Important things too know about using TODAY in a calculated column!
http://www.linkedin.com/news?viewArticle=&articleID=185992482&gid=93094&type=member&item=28659782&articleURL=http%3A%2F%2Fblog%2Epentalogic%2Enet%2F2010%2F09%2Ftoday-sharepoint-calculated-default-values%2F&urlhash=q1qF&goback=%2Egde_93094_member_28659782
How do I create a calculated column using [Today]?
http://pathtosharepoint.wordpress.com/?s=%5Btoday%5D
http://abstractspaces.wordpress.com/2008/05/19/use-today-and-me-in-calculated-column/
If you try to create column with field type : calculated and want to use current date as part of formula , the first thing that comes up in mind is to use [Today] as SharePoint gives it as filter option while creating views. But unfortunately if you try to add ‘[Today]‘ in formula, it gives error : “Calculated columns cannot contain volatile functions like Today and Me”
Same error goes when trying to use “[Me]” too.
Well, a nice trick can allow you to do this.
Open up the List Settings page where you want this column.
Create column named “Today”. The type doesn’t matter here, so let type as “Single Line of Text” and just click “Ok”
Now create the calculated column where you need to use current date within formula and add “Today” from available columns
Once this is done, we no longer need that our own generated column “Today” so you can delete it (Although when you need to edit formula you will need this again, so either recreate this dummy Today field or make it hidden using code behind. Otherwise SharePoint will put you again on that error screen).
This will trick the SharePoint to use [Today] (current date) as part of formula.
You can apply same trick for the current user i.e. [Me] too. Create a dummy field named “Me” use it in your formula, save the calculated column, and delete that dummy “Me” field.
In Part 2 we’ll see how to use Object Model to do this, as well as using the Computed Field to create more advance formulas
How do I compare a date value to TODAY?
You can trick sharepoint into creating a column for today’s date which you can then compare today’s date to another date (in this case revised date).
I created a column for “Today”, with single line of text and then created another calculated column “CalcToday” and set it equal to the “Today” column.
Once I was done I deleted the “Today” column and voila! You have a column which is set to the current date!
Then I just created the “Days Overdue” column which compares date information from certain items to be addressed/completed (a.k.a”Revised Date”) to “CalcToday”.























![Use [Today] and [Me] in Calculated Column](http://rbsandoval.com/wp-content/uploads/CalcColumn-sm.jpg)
