Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine 2 Business Days

Status
Not open for further replies.

kathyc20

Programmer
Mar 7, 2001
96
CA
Hello,

I have a program with a date field called "followupby" which needs to get filled in with 2 business days from the followupby date.

Can someone point me in the direction where I can find a sample of this code?

Thanks
 
Code:
dim FollowUpByDate as date 'set this to what ever the start date is
dim BusinessDays as integer = 0

While BusinessDays < 2
  FollowUpByDate = FollowUpByDate.AddDays(1)
  if FollowUpByDate.DayOfWeek <> DayOfWeek.Saturday and _
     FollowUpByDate.DayOfWeek <> DayOfWeek.Sunday Then
    BusinessDays += 1
  end if
End While

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top