Cloud and Microsoft technologies enthusiast architect in Switzerland RSS 2.0
# Friday, July 16, 2010

In SharePoint 2007 we had a problem when we wanted to create calculated columns using either the [Today] or [Me], respectively giving the current date and the current user. If you search on the web, a lot of pages are describing and talking about the workaround. The workaround is to create a "Today" or a "Me" column with the standard and default settings, writing the formula and then, finally, to delete the created columns.

I hoped that in SharePoint 2010, this was fixed. But when I created my first calculated column based on dates, here is what I got :

Exactly the same error we have in SharePoint 2007.

And.....exactly the same workaround. So, is it not considered as a bug or a problem for Microsoft ? Sure, there is a workaround, but it is quite annoying to create columns just to delete them right after. And, last but not least, when the formula has to be udpated, ensure that these columns are present otherwise, it will be impossible to save the new formula.

UPDATE

I got a correction from Ryan (see comment below) and indeed, the what-was-called-so-far-a-workaround in many pages on the web (and here also :-) ) is in fact not a viable solution. In fact, the column using this "trick" will only be updated and calculated when the item is updated. To see the confirmation of this, create a column with a formula like this : =IF([StartDate]>[Today],"Future","Started") with StartDate being a manually-set date and wait for that StartDate to be reached. If the item is not updated, the column will keep the "Future" label.

Anyway, the fact that it is not possible to have such functionality in SP2010 is a bit pity.

Thanks to Ryan for the correction

Friday, July 16, 2010 11:36:15 AM (GMT Daylight Time, UTC+01:00)  #    Comments [2] -
SharePoint | Technical
Friday, July 16, 2010 3:44:39 PM (GMT Daylight Time, UTC+01:00)
The 'workaround' isn't any use and it never has been. The value of [Today] is fixed when the list item is updated (or the list schema changed). Check back tomorrow and you will see that the dates are incorrect.

More details

http://blog.pentalogic.net/2008/11/truth-about-using-today-in-calculated-columns/

http://blog.pathtosharepoint.com/2008/08/14/calculated-columns-the-useless-today-trick/

This has been the case from SharePoint 2003 right the way through to 2010 despite some people insisting 'it used to work'.
Monday, July 19, 2010 7:48:12 AM (GMT Daylight Time, UTC+01:00)
Thanks Ryan for correcting this.

The only way for this to "work" (there is not enough double-quotes here), is to update the item every day. But then, we can use the "Modified" field as you suggest in your second link.

Yves
Yves
All comments require the approval of the site owner before being displayed.
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
Google Cloud Platform Certified Professional Cloud Architect
Ranked #1 as
French-speaking SharePoint
Community Influencer 2013
Navigation
Currently Reading :
I was there :
I was there :
I was exhibiting at :
I was there :
I was a speaker at :
I was a speaker at :
I was a speaker at
(January 2013 session):
I was a speaker at :
I was a speaker at :
United Nations (UN) SharePoint Event 2011
I was a speaker at :
I was there !
I was there !
I was there !
I was there !
Archive
<June 2022>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2022
Yves Peneveyre
Sign In
Statistics
Total Posts: 290
This Year: 0
This Month: 0
This Week: 0
Comments: 20
Themes
Pick a theme:
All Content © 2022, Yves Peneveyre
DasBlog theme 'Business' created by Christoph De Baene (delarou)