We help IT Professionals succeed at work.

Crystal date Range Modification  for 2 weeks

Maliki Hassani
Maliki Hassani asked
on
Experts,

How can I modify my query to lpull data for the last two weeks, instead of only 1 week.  Needs to still be from Monday - Sunday intervals.

Here is what I have that is for the LAST week.
{Command.UDF_CONVERT_UNIX_DATETIME(MX.DATE_CREATED,'US/EASTERN')} in CDate(dateadd("d",1,minimum(LastFullWeek))) to CDate(dateadd("d",1,maximum(LastFullWeek)))
Comment
Watch Question

Author

Commented:
I went with -7..  Will this work all the time?

{Command.UDF_CONVERT_UNIX_DATETIME(MX.DATE_CREATED,'US/EASTERN')} in CDate(dateadd("d",1,minimum(LastFullWeek)))-7 to CDate(dateadd("d",1,maximum(LastFullWeek)))
Top Expert 2011
Commented:
Ye it will work, you can also add -7 to the added 1 day in this way:
{Command.UDF_CONVERT_UNIX_DATETIME(MX.DATE_CREATED,'US/EASTERN')} in CDate(dateadd("d",-6,minimum(LastFullWeek))) to CDate(dateadd("d",1,maximum(LastFullWeek)))

Author

Commented:
Very Nice, thanks!