Calculate Work Days between Dates?

S

S.Y.M. Wong-A-Ton

You need to look into using the Weekday function (see
http://msdn2.microsoft.com/en-us/library/t51x9wtx.aspx) to detect and count
which days within the period of days were week days.

One way to do this is as follows: Once you've calculated how many days there
are between the two dates, begin at the start date and loop through all the
days one by one. Use the DateAdd function to increment the date everytime by
1 day, and check whether that day was a week day by using the Weekday
function. If it was, increment a counter that tracks how many week days there
were between the two dates.

Unfortunately, I do not have any code for this.
 

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