Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Return data if in certain month Post Reply Post New Topic
Author Message
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Topic: Return data if in certain month
     Posted: 13 Mar 2012 at 4:09am
The formula below only returns the else data of "NO", how do I write the month code so it will return data if the current month is in january, february, or march?

if({@DATE FORMULA})>1095 and month(currentdate)in [01,02,03] then "SELL DISPLAY" ELSE "NO"

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Mar 2012 at 4:34am
Your formula appears to be fine as far as teh month portion. Perhaps it is the first condition that is not working as you wanted?
YOu can create another formula with just that and palce it on the report canvas to get a t/f result per row to see how it is working
({@DATE FORMULA})>1095
IP IP Logged
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Posted: 13 Mar 2012 at 4:46am
Yes it was that part, I did not realize that my # was a negative number so it never read......

Fixed it  - thank you!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum