Thanks for the reply
Hi John.N
Thank you for your reply, but i found an even simpler awser. Check this out, without Vb scripting.
When you Substract the enddate from the begindate you will have the number of day open. Then you devide this number bij 7, now you have the number of weeks open. Round this number by 0,5. You will now have a accurate weekendindication
When you multiply this number ( rounded number ) by 2 you will have the total weekend days ( sat and sun ). Substract this from your first days open and you will have you total day open -/- weekend.
Open time: ( enddate - begindate )
Open weeks: Open time / 7
Round Open weeks: round (open time;0)
Open time -/- weekends: Open time - (Round open weeks*2)
For example:
Bdate = 18-06-02
Edate = 24-06-02
Opentime = 6
Open weeks = 6/7 = 0,85
Rounded Open Weeks = 1
Open time -/- weekends: 6 - ( 1*2 ) = 4 days = Working Days.
Check it it realy works !!