RE: agent with @business day Karl-Henry Martinsson 4.Mar.14 03:02 PM a Web browser Applications Development All ReleasesAll Platforms
Nothing complicated, there are multiple ways to do it.
Here is a quick hack. You should of course add error handling, perhaps modify the code to accept the date in different formats/different data types, etc.
Description: Calculate number of weekdays/bsuiness days between two dates
Function BusinessDays(startdate As String, enddate As String) As Integer
Dim sdate As Double
Dim edate As Double
Dim n As Double
Dim bdays As Integer
sdate = CDat(startdate)
edate = CDat(enddate)
bdays = 0
For n = sdate To edate
If Weekday(n)<7 And Weekday(n)>1 Then
bdays = bdays + 1
BusinessDays = bdays