Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

A view I created is supposed to filter by the current year. The formula should compare the current year with a column which only has the year.

I don't know how to always get the current year.

I tried creating a calculated column with this formula "Year([Today])" but sharepoint does not like it.

I tried using this formula "Year(Today)" and the view does not return any items.

How do I compare a column with the current year? I am unable to get the current year.

share|improve this question
add comment

3 Answers

Check this workaround and see if it helps:

SharePoint TODAY field and calculated fields...

I used it once before and it works.

I hope you are aware that calculated columns are calculated when item is updated. So after 31.12. 00:00 your calculated columns will no longer be valid (if items are not updated).

share|improve this answer
1  
Ah yes, I nicknamed this the 'Overworked Secretary' problem (on my company's blog, that mentions our product): blog.pentalogic.net/2011/05/how-use-today-in-a-sharepoint-list This is purely informational on the subject, and won't help answer the question, unfortunately. –  Stuart Pegg Sep 28 '11 at 20:37
    
@StuartPegg Nice! –  Vedran Rasol Sep 28 '11 at 21:10
add comment

You might need two calculated columns. One which is the jan/1/year and the other which is dec/31/year.

=TEXT(Date,"01/01/yyyy")

=TEXT(Date,"12/31/yyyy")

Then in your filter you can have it setup so that the first column is less than today and the second column is greater than today.

There might be a better way but this was my first thought.

share|improve this answer
add comment

I've achieved it using something like this http://sivanesanb.blogspot.ch/2011/11/how-to-use-filters-in-sharepoint-to.html#!/2011/11/how-to-use-filters-in-sharepoint-to.html

Also did another one for the Quarter using the formula =ROUNDDOWN(((INT(MONTH([Created]))-1)/3),0)+1

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.