system
1
I’m converting some Crystal 2008 reports to BOXI and would like a second opinion on what the following Record Selection criteria means.
I think it means, show the results between the most recent Saturday and the Saturday before that, any thoughts?
Record Selection:-
{HPD_Help_Desk.Reported_Date} in {@Start} to {@End}
@Start definition:-
numberVar modif := DayOfWeek (currentdate,crSaturday) +{?Backdate};
DateDiff ("s",#01/01/1970# ,(currentdate-modif));
@End definition:-
numberVar modif := DayOfWeek (currentdate,crSaturday) +{?Backdate};
DateDiff ("s",#01/01/1970# ,(currentdate+7-modif));
Paul Shovlar
(BOB member since 2002-09-05)
system
2
In both formulas the calculation for modif does the following:
- Get the day of the week as a number for the current date, assuming that Saturday is the first day of the week.
- Add the result of step 1 to the value of the {?Backdate} parameter.
In the start formula, it then does this:
- Subtract the value of modif from the current date (results in a date.)
- Get the difference in seconds between that value and 1/1/1970.
In the end formula it does this:
- Add 7 days to the current date and subtract the value of modif.
- Get the difference in seconds between that value and 1/1/1970.
-Dell
hilfy
(BOB member since 2007-04-16)