Baskar P
asked on
need to find the business days using the vb script
hi,
I need to find the today date is business day or not.
if today days is saturday then i want to add 16 businnes date after, if its sunday i want to add 15 date after.
kindly help on this by using vb script.
Regards,
Baskar P
I need to find the today date is business day or not.
if today days is saturday then i want to add 16 businnes date after, if its sunday i want to add 15 date after.
kindly help on this by using vb script.
Regards,
Baskar P
ASKER
is showing error in line 8 syntax error
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi guys,
I had a live session with author (and put the solution after that) and he only wants to find the day after 15 business days...
so, logic is very simple...
today = Date
nextDate = today
dw = DatePart("w",today)
if dw=7 then
nextDate = DateAdd("d",23,today) ' saturday
elseif dw=1 then
nextDate = DateAdd("h",22,today) ' sunday
else
nextDate = DateAdd("d",21,today) ' week days
end if
Bill's code is almost same as this one, but it finds the day after 10 business days...
And code by Shaun's, dont know what it is all about, did not test... probably will give somethijng else, since we dont need that amount of code and logic is very simple...
So, Accepted solution should be ID: 42258139
Accepted solution should be ID: https:#a42258139
(see my previous post)
(see my previous post)
Open in new window