Find in Crystal report 8.5 if a field ( a date field) is in range of current week or in a date 2 weeks before 3 weeks before

Hi There,
In Crystal report 8.5, I'm trying to find if a field in the report a date field is in range of current week or in a date 2 weeks before 3 weeks before or older

if {@ExpDate} > LastFullWeek then "Late Current Week"
else


if {@ExpDate} in LastFullWeek then "Late Last Week"
else
if {@ExpDate} in something for 2 weeks before  then "Late for  Last 2 Weeks"      ---- Not sure how to do this
else
if {@ExpDate} in something for 3 weeks before  then "Late Last 3 Weeks"      ---- Not sure how to do this
else
"Late more than 3 Weeks Ago"

Will appreciate if somebody can tell how to do 2 weeks and 3 weeks.
Thanks
SivasanAsked:
Who is Participating?
 
mlmccCommented:
Try this

if {@ExpDate} > LastFullWeek then 
    "Late Current Week"
else if {@ExpDate} in LastFullWeek then 
    "Late Last Week"
else if {@ExpDate} >= Minimum(LastFullWeek) - 7 then
    "Late for  Last 2 Weeks"
else if {@ExpDate} >= Minimum(LastFullWeek) - 14 then
    "Late for  Last 3 Weeks"
else
    "Late more than 3 Weeks Ago"

Open in new window


mlmcc
0
 
SivasanAuthor Commented:
Hi mlmcc,
Awesome, that works Thanks a million.
0
 
SivasanAuthor Commented:
Thanks a million...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.