In have a report that requires a count of totals based on 30, 60, 90 120 days. So my report ending June 30 will contain approx 2500 records. I then need to count the number of records in the last 30 days, then the 31 to 60 day, then 61 to 90, etc.
So, I have a my date variables auto calculate based on @end_date variable.
i.e. @end_date is set to DATE(2004,6,30), so @minus_30 is
if day({@End Date})=31 then
DateAdd("d", -31, {@End Date})
else
DateAdd("d", -30, {@End Date})
and @minus_60 is the same with =31 set to =61 and so on.
But...
when I try to set my @count_30 to be
NumberVar Count30:=0;
if {REFERRAL.REFERRAL_DATE} < {@end_date} and {REFERRAL.REFERRAL_DATE} > {@minus_30}
Then Count30 := Count30 + 1
it doesn't count right ( or at all ).
I need some help with my syntax for this 'between' type stmt.
thanks,
Frog
------------------
Curious by Nature,
Linux by Design
So, I have a my date variables auto calculate based on @end_date variable.
i.e. @end_date is set to DATE(2004,6,30), so @minus_30 is
if day({@End Date})=31 then
DateAdd("d", -31, {@End Date})
else
DateAdd("d", -30, {@End Date})
and @minus_60 is the same with =31 set to =61 and so on.
But...
when I try to set my @count_30 to be
NumberVar Count30:=0;
if {REFERRAL.REFERRAL_DATE} < {@end_date} and {REFERRAL.REFERRAL_DATE} > {@minus_30}
Then Count30 := Count30 + 1
it doesn't count right ( or at all ).
I need some help with my syntax for this 'between' type stmt.
thanks,
Frog
------------------
Curious by Nature,
Linux by Design