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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date range selection criteria formula for specified period 1

Status
Not open for further replies.

urbanhim

MIS
Jul 11, 2007
154
0
0
GB
I need to run a report for a date range that I cant for the life of me work out how to do it...

I have a Date field:

{AUDIT_ACCOUNT_EXCHANGE_ACCESS.CREATED_DATE} which needs to show data from (and including) the THIRD friday of the previous month, to the THIRD thursday of the current month.

I cant workout how to do this, any help would be appreciated.

Thank you




UrbanHim
Crystal XI Report Writer
London
[shadeshappy]
[small]What's the best cure for a hangover?... Heavy drinking the night before!![/small]
 
Try the following:

{AUDIT_ACCOUNT_EXCHANGE_ACCESS.CREATED_DATE} in
(if dayofweek(minimum(lastfullmonth)) = 7 then
minimum(lastfullmonth) + (27 - dayofweek(minimum(lastfullmonth))) else
minimum(lastfullmonth) + (20 - dayofweek(minimum(lastfullmonth))))
to
(if dayofweek(minimum(monthtodate)) in [6,7] then
minimum(monthtodate) + (26 - dayofweek(minimum(monthtodate))) else
minimum(monthtodate) + (19 - dayofweek(minimum(monthtodate))))
 
This formula is spectacular!! It works a treat, thank you so much! Its brilliant!!

UrbanHim
Crystal XI Report Writer
London
[shadeshappy]
[small]What's good for a hangover?... Heavy drinking the night before!![/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top