Hi Steve,
Cheers for your help, I had looked at the link before but working for a computer with no ability to download or unzip. The only script I can try is the following:-
Datevar FirstDay:= Date({APPLIC_LIST_ENTRIES.ALE_STATUS_START});
datevar LastDay := Date({APPLIC_LIST_ENTRIES.ALE_STATUS_END});
numbervar Days;
numbervar Weekends;
numbervar Finaldays;
DateVar StartDate;
Datevar EndDate;
if firstday <=Date(0,0,0) or LastDay <=Date (0,0,0) then
finaldays := 0
else
(if dayofweek(FirstDay) = 7 then
startdate:= FirstDay +1
Else
Startdate := FirstDay;
If dayofweek (lastday) = 7 then
enddate:=LastDay +2
Else if dayofweek (lastDay) = 1 then
enddate := LastDay + 1
Else
EndDate := LastDay;
Days := (endDate - StartDate) +1;
if Days >=7 then
Weekends := (Round((Days/7),0))*2
else if dayofweek(startdate) > dayofweek(enddate) then
weekends := 2
else
weekends := 0;
Finaldays := Days-Weekends;
If dayofweek (lastday) = 7 then finaldays:= finaldays -1;
if dayofweek(lastday) = 1 then finaldays:=finaldays - 2;
);
finaldays;
When I try testing this I get the error 'The result of selection formula must be Boolean.
Also my 2 date fields are datetime, what is the correct conversion for this! Any help appreciated!
Many thanks
Sam