Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Filtering a view based on 30 days to and from Today

7,166 views
Skip to first unread message

Boris Gomiunik here is at sign

unread,
Aug 19, 2004, 4:46:48 PM8/19/04
to
I'm not sure if this works, but have you tried to set the filter to display
values greater than ([today]-30) and less than ([today]+30)

If this doesn't work, then create 2 calculated fields:

Field 1 should have formula [today]+30

Field 2 should have formula [today]-30

Then make filter that displays records with field1 value less than [today]
and field 2 value greater than [today].

Hope I've been clear enough.

Boris Gomiunik
B4Contact
www.b4contact.com


"DavidInTexas" <DavidI...@discussions.microsoft.com> wrote in message
news:EF7B7918-857F-4C2A...@microsoft.com...
> I want to display a view that shows only those records who have a value in
a
> Date field that is plus-or-minus 30 days from today.
>
> I have seen the posts that explain how to do this based on the Date
Created
> or Date Modified, but I don't want to use these values - rather, I want to
> use a value that has been entered into a specific field in each record.


DavidInTexas

unread,
Aug 19, 2004, 6:27:02 PM8/19/04
to
Sorry - that doesn't seem to work. Sharepoint Services is OK when using
[today] by itself in a column or filter formula. However, it will not let me
save [today]+30 or the like in a column or filter. For a column, it gives an
error message, stating that dynamic values such as [today] or [me] cannot be
used in column formulas. Sharepoint also gives me an error message when I
attempt to wrap a formula such as Date() or Datevalue() around [today].

I'm open to try other things. I'm surprised that this is so hard to do with
this software!

Bil Simser [MVP]

unread,
Aug 20, 2004, 1:25:54 AM8/20/04
to
"DavidInTexas" <DavidI...@discussions.microsoft.com> wrote in message
news:6ABE54BD-2327-4E02...@microsoft.com...

> Sorry - that doesn't seem to work. Sharepoint Services is OK when using
> [today] by itself in a column or filter formula. However, it will not let
me
> save [today]+30 or the like in a column or filter. For a column, it gives
an
> error message, stating that dynamic values such as [today] or [me] cannot
be
> used in column formulas. Sharepoint also gives me an error message when I
> attempt to wrap a formula such as Date() or Datevalue() around [today].

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(Modified),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


Boris Gomiunik

unread,
Aug 20, 2004, 1:30:07 AM8/20/04
to
Then try with the other:

make "Calculated field" for field 1 and field 2. I know it works because
I've made something similar.


"DavidInTexas" <DavidI...@discussions.microsoft.com> wrote in message

news:6ABE54BD-2327-4E02...@microsoft.com...

Alessandro

unread,
Nov 5, 2004, 7:57:01 AM11/5/04
to
Sorry Bill how can I manage this formula for showing only those records
created this month or last month?
Thank you Alessandro
0 new messages