Calculated fields with business days

K

KGMSP

I have a couple calculated fields in my project and notice that the fields
were not using buisness days.

For example; one of the fields calculates what I call elapsed schedule
(Status Date - Baseline Start). This formula gives me a number in which
then I plan to add it to another date field. What I have notice is that the
number added to the date is correct however the date given is not. For
example: ON Jan 7 (Fri) add 4 days to this and you should get 1/12 (Wed) if
it were to use the current Project Calendar, however the above calculation
gives you 1/17 (Monday) becuase it counts the holidays. I have seen in
project functions the ProjDateAdd(Date, Duration, Calendar) but I am not sure
what this entails. Is this the right field to use for this example, if so
then would this be correct syntex::::::::::::::

ProjDateAdd(Date1, Elapsed Schedule, "Standard"). If this is the right
syntex, I can't seem to get it to work.

Please help,
 
J

JackD

It is the right function.
Your example appears to be wrong.
If you are using the default calendar ("standard") then you can leave it
out.

This code works:

Sub adddays()
dim t as Task
set t =ActiveProject.Tasks(1)
t.Date1 = Application.DateAdd(t.Date1, "5d")
End Sub

You can see that the duration should be in the format above.
 

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