Need Help with Calculating Dates

G

Guest

Our client will provide us with a “cycle start dateâ€, each cycle has a
total of 9 release dates, the first release date is in fact the cycle’s start
date, in turn we have to calculate 8 additional dates. Each of the 8
subsequent dates must be in intervals of 10 workdays, however if the intended
date falls on a Saturday the release date is advanced to Friday, if the
release date falls on a Sunday the release date is extended to Monday and if
the release day falls on a holiday the release date is extended to the next
workday.

Lets pretend that our holiday schedule is:
New Years Day, 4th of July, Thanksgiving, Christmas

Using the following sample code I have figured out how I can calculate the 8
subsequent dates however despite finding some articles about how to
manipulate dates, I’m totally lost when it comes to how write the code to
extract Saturdays, Sundays and Holidays.

Private Sub Form_Current()


Del1 = DateAdd("d", 10, [CStartDate])
Del2 = DateAdd("d", 10, [Del1])
Del3 = DateAdd("d", 10, Del2)
End Sub

Since I’m not very skilled with code. Kindly include all the necessary
keystrokes in any recommendations you may provide.

Thanks in advance for any comments or suggestions.

Regards,

Larry G.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top