Find the count of a weekday between two dates without iterating/looping [Tip/Trick]
Posted: 9 Nov 2011
Updated: 11 Nov 2011
Views: 1,908
Rating: 2.71/5
Votes: 4
Popularity: 1.40
Licence: The Code Project Open License (CPOL)
Bookmarked: 1
Downloaded: 0
Single line in Linq This gets you the number of weekdays, i.e., Monday to Friday between given two dates.[VB]Dim dt1 As New Date(2011, 1, 1)Dim dt2 As New Date(2011, 1, 15)Dim days As Integer = (From d As Date In _ (Enumerable.Range(0, 1 +...