Skip to main content

Blogging about SharePoint

Go Search
Home
Blogging about SharePoint
Public Speaking
  

Michael Blumenthal's BlumenthalIT.NET > Blogging about SharePoint > Posts > What, no WEEKNUM()?
What, no WEEKNUM()?

I wanted to make a view that shows only the list items that had a date within the current week. I was figuring that I could do this by creating a calculated column for the week number and the year, then creating a view that would filter on the calculated WeekNum being equal to WeekNum([Today]). Except that when I tried creating the calculated column, I got the following error: "The formula contains a syntax error or is not supported." Since my formula was pretty simple, I have to assume the function is not supported. Anyone seen documentation on the formulas that are supported? I haven't found this yet.

As a workaround, I created a view that shows items that have a date within the next 7 days. Not the same, but hopefully good enough for now. The filter clause is <date field you selected> "is less than" [Today]+7. Note that there are no spaces in "[Today]+7".

For two weeks out – really 8-14 days out, I did something similar: greater than [Today]+7 and less than or equal to [Today]+14.

--Michael

Comments

There are no comments yet for this post.
Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Please put your name at the end of your comment as the Name field doesn't display in the main view of the comments.

Name: *


Your name.  If you first name is Michael, please provide initials or the like to clearly distinguish your name from Michael Blumenthal's.
Also, this field does not appear in the main view of the comments.

Need Paid Consulting Services?

Are you interested in engaging a SharePoint consultant for fee-based consulting services?  If so, I can have an Account Executive from my employer contact you.  Other site visitors will not see this column.

Additional Contact Information

Please provide additional contact information if you need a direct response.  Other site visitors will not see this column.

What is tomorrow's date? *

This is a weak CAPTCHA based on advice from a tweet from @ToddKlindt.
Attachments