|
I am guessing that the day of week is a parameter and so are the 2 dates...with that assumption, here is one way:
shared numbervar d:=0
local numbervar ind;
local datetimevar oneDay := {?startParameter};
while oneDay < {?endParameter} do (
if DayOfWeek(oneDay) = {?DayOfWeekParameter} then d:=d+1;
oneDay := DateAdd('d', 1, oneDay);
);
d;
Some of my syntax may be off, and I am making the assumption that you will convert the day of week from Monday to 2...A simple command should allow you to do that, something like:
select 'Sunday' dow, 1 dayNo
union
select 'Monday' , 2
etc...
At least that should work, if not something very close.
just a thought, hope it helps
|