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!

Formula for date ranges

Status
Not open for further replies.

rebecca2006

Technical User
Jul 26, 2006
2
0
0
US
Hello,
Sorry I'm very new at Crystal... I am trying to write a report that groups employees' review dates, by current month, previous month and next month. Can somebody tell me how I can do this? Again sorry this is very new to me..
 
When you post here you need to tell us the version of crystal you are using and the database type.

That being said, this should work.

Create a fomula with the following:

If month(ReviewDate) = month(currentdate) then "Current Month"
else
If month(ReviewDate) = month(LastFullMonth) then "Previous Month"
else
If month(ReviewDate) = month(dateadd("m", 1, currentdate) then "Next Month"

Then group on the formula.

BB
 
Forgot a paren in the last line use this

If month(ReviewDate) = month(dateadd("m", 1, currentdate)) then "Next Month
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top