David McAfee
davidmcafee at gmail.com
Mon Apr 18 15:01:32 CDT 2011
Yes, but I can check if Saturday in Question (SiQ) is less than:
IF SiQ < DateAdd("d",(7 * NumOfSats),StartingSat) THEN
Is Affected = ((SiQ - StartingSat) Mod 14 = 0)
ELSE
IsAffected = False
END IF
Or even easier:
? IIF(SiQ <DateAdd("d",(7 * NumOfSats),StartingSat) ,((SiQ - StartingSat)
Mod 14 = 0) ,False)
On Mon, Apr 18, 2011 at 11:11 AM, Gustav Brock <Gustav at cactus.dk> wrote:
> Hi David
>
> Easier, yes, but it doesn't answer "such as Every other Saturday for the
> next x Saturdays starting 4/16/2011".
>
> /gustav
>
>
> >>> davidmcafee at gmail.com 18-04-2011 19:52 >>>
> Thanks AD, that's exactly what I was looking for!
>
> I was thinking of doing something like Gustav suggested, but knew there had
> to be an easier way.
>
>
>
> On Sat, Apr 16, 2011 at 8:57 PM, A.D. Tejpal <adtp at airtelmail.in> wrote:
>
> > David,
> >
> > Another alternative could be considered.
> >
> > You wish to ascertain whether date Dt2 falls on one of the alternate
> > Saturdays starting from Dt1 which is a Saturday.
> >
> > If the test is to be reflected via a Boolean variable IsAffected, the
> > following could be tried:
> >
> > IsAffected = ((Dt2 - Dt1) Mod 14 = 0)
> >
> > If the condition is to be checked in an If / End If block, the syntax
> > could be as follows:
> >
> > If (Dt2 - Dt1) Mod 14 = 0 Then
> >
> > Best wishes,
> > A.D. Tejpal
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>