I hoping someone can help? This has got me puzzled? I am basically pickign this information up from a list of public holiday dates. I have the code search the list and if any of the dates there it gives me a total at the end which can then be subtracted from in this case holiday dates.
The code works but it is ignoring the last date on the list. The form with the public holiday dates only has the facility to enter 8 dates.
This is part of the code I am using if I remove one of the 8 dates and only have 7 it works fine? Im kind of stuck now.
Holidays points to the list with the dates on…the total of bank hols is then used to subtract from the total days required.
Holiday1 := @Subset(Holidays;1);
Holiday2 := @Subset(@Subset(Holidays;2);-1);
Holiday3 := @Subset(@Subset(Holidays;3);-1);
Holiday4 := @Subset(@Subset(Holidays;4);-1);
Holiday5 := @Subset(@Subset(Holidays;5);-1);
Holiday6 := @Subset(@Subset(Holidays;6);-1);
Holiday7 := @Subset(@Subset(Holidays;7);-1);
Holiday8 := @Subset(@Subset(Holidays;8);-1);
Hol1 := @TextToTime(Holiday1);
Hol2 := @TextToTime(Holiday2);
Hol3 := @TextToTime(Holiday3);
Hol4 := @TextToTime(Holiday4);
Hol5 := @TextToTime(Holiday5);
Hol6 := @TextToTime(Holiday6);
Hol7 := @TextToTime(Holiday7);
Hol8 := @TextToTime(Holiday8);
BankHols :=
(@If(Hol1 >= From & Hol1 <= To;1;0));
-
(@If(Hol2 >= From & Hol2 <= To;1;0));
-
(@If(Hol3 >= From & Hol3 <= To;1;0));
-
(@If(Hol4 >= From & Hol4 <= To;1;0));
-
(@If(Hol5 >= From & Hol5 <= To;1;0));
-
(@If(Hol6 >= From & Hol6 <= To;1;0));
-
(@If(Hol7 >= From & Hol7 <= To;1;0));
-
(@If(Hol8 >= From & Hol8 <= To;1;0));
Thanks for any help anyone can offer
Mark