Just another link but it looks promising:
http://www.codeproject.com/Articles/...Days-to-a-Date
I just tested it and it seems to work OK. Very similar to what is already posted.
Code:Public Function CalculateTenBusinessDaysFromInputDate(ByVal StartDate As Date) As Date 'This simply adds at least 2 full weeks to the start date. Select Case StartDate.DayOfWeek Case DayOfWeek.Sunday 'if the start date is not a sunday you need to add '1 day to push it to a monday that is why the number is 15. Return StartDate.AddDays(15) Case DayOfWeek.Monday, DayOfWeek.Tuesday, _ DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday 'if the start date is any other day then just add 14 days to the start date. Return StartDate.AddDays(14) Case DayOfWeek.Saturday 'if the start date is on a Saturday you need to add '2 days to push it to a monday that is why the number is 16. Return StartDate.AddDays(16) Case Else Return StartDate End Select End Function




Reply With Quote
