Hello All,
I'm having a difficult time getting a saved search to display a time period for 5 weeks back from the start of a week. I filed Enhancement#88453 but I'm sure there is a way to do it with a CASE statement. Any help is appreciated.
Problem: Look at only sales orders from 5 weeks back by week. (not relative, or date to week, month or year)
Example:
Date 8/20/2012 through 8/26/2012 I only want to see data from 7/16/2012 to 7/22/2016 not a rolling period but a static week. Next week I would only see data from 7/23/2012 to 7/29/2012 and so on.
Any of the ranges or relative does not work because each day the date moves one day farther out.
NS will let you look at year, month but I could not find any ranges that only look at weeks. In the drop down (using double date ranges) you can get start or end of week but not something with 5 weeks back.
I started with this:
CASE WHEN ({today} - {trandate}) BETWEEN 31 AND 35 then 1 else 0 end
The problem is each day moves the date range and I get data +1 day. I want the data to show 5 weeks back. Is there a SQL statement I can use to get at the data?
I also tried:
case when to_char({datecreated},'mm') = 07 however I could not figure out how to make it for a week and then roll into the next week. Again only looking for data from that 5th week.
Hopefully someone else has had this issue and will let me know what the trick is.
Thank you,