I need to get the business days excluding Saturdays, Sundays, and 10 holidays. I have written the below formula however on execution getting error message “Incorrect datatype for operator…”
FIELD currDate:=@Today;
FIELD currYear := @Right(@Text(currDate);4);
FIELD holidays := holidays;
@If(dtFromDate = “”;@Do(@Prompt([Ok]; “Alert” ; “Kindly select from date”);@Return(“”));“”);
@If(dtToDate = “”;@Do(@Prompt([Ok]; “Alert” ; “Kindly select to date”);@Return(“”));“”);
@If(dtFromDate > dtToDate;@Do(@Prompt([Ok];“Error Alert”;“To Date cannot be less than From Date”);@Return(“”));“”);
x := @DbLookup(“”:“NoCache”;“”:“TITANManESP.nsf”;“Holidays”;currYear;“HolidayDateAll”);