Reputation: 385
I want to store the current date in a column's view i have and then compare it with a date a user has saved.
Is it possible to get the current date in sharepoint 2010?
Upvotes: 4
Views: 26121
Reputation: 13
Did you know:
Calculated Fields DO accept =Today()
then select the datea type as Date.
Tested and working: You can use Today() in the DATEDIF function. Then select the formula output data type as expected, for example you can use number if the expected output is "D" for days.
http://office.microsoft.com/en-us/help/datedif-function-HA001160981.aspx
Upvotes: 1
Reputation: 1317
I wrote an article on our company blog that outlines the various methods of using [Today] in this context, as well as a little background on why [Today] isn't available in calculated columns:
Warning: this also contains recommendations for our own product
How to use [Today] in a sharepoint list
Here are the main methods covered:
Upvotes: 2
Reputation: 51
You can use [Today] as a filter in views. For example, for a task list you could filter overdue tasks by setting a filter "DueDate < [Today]".
Upvotes: 3
Reputation: 28134
You cannot store the current date. What you can do is use the current date to filter the results of a query.
Upvotes: 0