I\'m a SQL guy, but I need a function to calculate the number of weekdays between two dates in VB.NET. I don\'t need to worry about holidays. My attempts unfortunately have
I have an expression that will calculate amount of specific day of week between two dates. So if you add amount on Mondays, Tuesdays ... Fridays you will get the amount of week days.
=SUM(int((DatePart("d",Fields!dteEndDateTime.Value) - Weekday(DateAdd("d",1-**[DayofWeek]**,Fields!dteEndDateTime.Value)) - DatePart("d",Fields!dteStartDateTime.Value) + 8)/7))
[DayofWeek] is an integer representing a day: 1 - Sunday; 2 - Monday
So an expression that will calculate amount of Mondays between dteStartDateTime and dteEndDateTime is:
=SUM(int((DatePart("d",Fields!dteEndDateTime.Value) - Weekday(DateAdd("d",1-2,Fields!dteEndDateTime.Value)) - DatePart("d",Fields!dteStartDateTime.Value) + 8)/7))