Date Differences for work days only

M

Mick

I want to compare two dates to determine the number of work days that they
differ by - similar to the NETWORKDAYS function in excel. I am using this to
generate status based on the difference and I don't want to have weekends or
holidays to negatively impact the calculation.
 
J

John

Mick said:
I want to compare two dates to determine the number of work days that they
differ by - similar to the NETWORKDAYS function in excel. I am using this to
generate status based on the difference and I don't want to have weekends or
holidays to negatively impact the calculation.

Mick,
I assume you want to use a formula in a customized field (as opposed to
a VBA macro). There are two formulas for date differences. One is for
calendar days and the other is what you want - working days. The latter
is:
ProjDateDiff(date1,date2,calendar)
Note: if "calendar" is not specified the calendar of the active project
is used.

For future reference, look in the Project Help file under "functions" to
get the syntax for using formulas in Project custom fields.

Hope this helps.
John
Project MVP
 
M

Mick

John,

Thanks but I tried that. I did read the help and it was not helpful. I have
divided the amount by 1440 since it delivers the answer in minutes. In my
previous formula where I just subtracted the different dates I was getting a
different of 30 - 35. When I used the ProjDateDiff formula I was getting a
different of around 8. Clearly this is not correct. Also, I can't seem to
enter the correct 'calendar'. How is that entered, in quotes, without them,
what is the project calendar?
 
J

Jan De Messemaeker

Hi,
The project calendar is the default so you can leave the third argument out
And it does work.
HTH
 
M

Mick

Jan,

Thanks again but what would go in there if I wanted to have a different
calendar? Does it go in quotes, etc.

Also, I divided by 1440 because there are that many hours in a day. Should I
instead divide by 480 - the number of minutes in the assigned work day? Is
that my problem?

Mick
 
J

Jan De Messemaeker

Hi,

Between "" works fine for me.
Note that the project calendar is generally called "Standard" not "Project
Calendar"
And yes, it's the value of numnber of minutes in a working day.
HTH
 
J

John

Mick said:
Jan,

Thanks again but what would go in there if I wanted to have a different
calendar? Does it go in quotes, etc.

Also, I divided by 1440 because there are that many hours in a day. Should I
instead divide by 480 - the number of minutes in the assigned work day? Is
that my problem?

Mick

Mick,
I think Jan answered your questions but I have one for you. How do you
get 1440 hours in a day? (grin)

John
Project MVP
 

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