SharePoint: using the [Today] variable in a calculated field
This great post explains a way to actually use the [Today] variable in a calculated field!
“[Why is it difficult to] filter by [Today] - 5 so I can show items added or modified in the last 5 days?” It turns out you can using the following workaround:
- Add a new field to the List or Document Library named Aging or whatever you prefer.
- Set the Type to Calculated.
- Set the Description to "(Filter - Last 5 days)" or whatever you prefer.
- Set the Formula to
=DATE(YEAR(Modified),MONTH(Modified),DAY(Modified)+5) - Set The data type returned from this formula is: to Date and Time
- Set the Date and Time Format: to Date Only. Don't add it to the default view (unless you want to)
- On the View in question, set the filter to
Aging is greater than (or equal to) [Today]
The filtered view will now only show items that have been modified in the last 5 days. You can adjust the formula for the field (or add another) to get a different filter (last 10 days, last month, last year, etc).
*
Also, a few other great formula pages I ran across:
0 Comments:
Posta un commento
<< Home