Sorry but I didn't understand.
This is the part of my script when I apply the function:
Date(StartDate,'DD/MM/YY') As StartDateFormatted,
Date(EndDate,'DD/MM/YY') As EndDateFormatted,
networkdays (DataInizio, DataFine) As WorkingDays;
How can I apply your suggestion?
Ah, ehm, you can't. Not without using a calendar, which you don't want to do. You could try adding a vbscript function in the macro editor:
Function GetWorkDays(StartDate, EndDate)
dCount = 0
For dt = StartDate To EndDate
If WeekDay(dt) <> 1 Then
dCount = dCount + 1
GetWorkDays = dCount
And use that function in the load script. Make sure the dates that are passed to the function are numeric dates.
GetWorkDays(StartDate,EndDate) as WorkingDays
since there is no function for script (except Marco) I would prefer a calculation in script:
floor(((Date2 - Date1)+1)/7)*6 + mod((Date2 - Date1)+1,7)
+ if(Weekday(Date1) + mod((Date2 - Date1)+1,7) < 6, 0, -1) as Workingdays_6
Please see atached example. Hope I have covered all variations. Maybe there is a possibility of simplification ..