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!

adding days and half days

Status
Not open for further replies.

newbie404

Programmer
Mar 2, 2004
19
IE
I am trying to write a function where I add a number of days or half days to a date. however, I am not sure how to add days of the week (M-F) only when adding days.

I thought that it was newdate=DateAdd("w", 1, indate)
but this seems to just add a single day even if it is adding to friday. I want to do it so that I can pass in 12 or 14 or similar days and t will add that number of working days.

Is there an easy way to do this before I write a big complex function?

thanks
 
newdate=DateAdd("ww", 1, indate)
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week
h Hour
n Minute
s Second



Sam
 
Ahh.. I misunderstood the question. Even though the help says "w" will add weekdays(M-F) you are correct it doesn't. interesting.

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top