View selection using range and two date fields

I have two different date fields on a form and I need a view selection formula that will display docs whenever either one of those two date fields falls within a specified range. The date range is our fiscal year which runs from Sep - Aug.

ie: if Date1 or Date2 is between 9/1/06 - 8/31/07

Subject: View selection using range and two date fields

Paul,

I think this works:

SELECT (Date1 >= [9/1/2006] | Date1 <= [8/31/2007]) | (Date2 >= [9/1/2006] | Date2 <= [8/31/2007])

Subject: RE: View selection using range and two date fields

Thanks for the suggestion, that was my original formula which I should have posted. But it would show ANY document where the first date field was prior to 8/31/2007, such as 1/1/2004 which is outside of my date range.

I ended up changing it like so and it seems to be working fine.

(Date1 >= [09/01/2006] & Date1 <= [08/31/2007]) | (Date2 >= [09/01/2006] & Date2 <= [08/31/2007])

Thanks again.

Subject: RE: View selection using range and two date fields

or…

DATE_RANGE := @TextToTime(“[09/01/2006] - [08/31/2007]”) ;

Date1 = DATE_RANGE | Date2 = DATE_RANGE

cos ‘=’ operator also means IsMember when RHS is a list

Simon

Subject: RE: View selection using range and two date fields

Simon, Thanks for the great response as I too was looking for a way to create a view based on fiscal year. The above works great.