Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying only THIS MONTH's items in a list???

Status
Not open for further replies.

greight01

Programmer
Jun 22, 2005
2
US
I read a tutorial online about how to go about doing this here:
It seemed to work at first... but then I noticed that it is not only showing JUST this month, it is also showing the last six days before this month and the last six days after.

Does anyone know any other way to accomplish this other than what was posted above? Or does anyone know of anything I could be doing wrong?

Thanks in advance.
 
Hi i found this:

The calculated fields are tricky. Here's something I found on a blog. I'll
probably write up a better blog about creating calculated fields because
it's an area that needs some documentation as you can do a lot, you just
need to know how to do it. Hope this helps:

1. Add a new field to the List or Document Library named Aging or some such.
2. Set the Type to Calculated.
3. Set the Description to "(Filter - Last 5 days)" or some such.
4. Set the formula to =DATE(YEAR(Modified),MONTH(Mod­ified),DAY(Modified)+5)
5. Set the 'The data type returned from this formula is:' to Date and Time


6. Set the 'Date and Time Format:' to Date Only


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).


Where you see "Modified" use the field name [FieldName] for your values.


-Bil

---------

In your case the formula in step 4 should be
4. Set the formula to =DATE(YEAR(Modified),MONTH(Mod­ified)+1,DAY(Modified))

Greetings

Paul
 
Thank you very much for the speedy reply but I have ran into a problem with this.

This works well when dealing with Created/Modified dates as they are never greater than TODAY. I will be working with an added in date field that the dates can be in the future. Sooo, if I am looking at items for THIS MONTH, I can modify the above to make it where it shows all of June, BUT it shows all of July as well since it is calculating greater than TODAY.

I need a way to add in a filter of LESS THAN the end of the month.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top