Calendar duration

C

Carsten

Duration in MS Project means actual work for a task.
Is it possible to calculate and show in a field the
calendar time between Start and Finish?
 
G

Gérard Ducouret

Hello Carsten,
Insert a Duration field such as Duration1 and enter the formula :
(DateDiff("d";[Start];[Finish])*[Minutes Per Day])+[Minutes Per Day]

Hope this helps,

Gérard Ducouret [Project MVP]
PragmaSoft ® - Paris
 
S

Steve House

Duration does NOT mean actual work on a task in MSP. The work is the Work
field, measured in man-hours. Duration is the number of *working time
units*, as defined by the Project or other governing calendar, between when
a task begins and when it ends. Elaped Duration means the total *clock*
time, the time that you see on calendars that you get free at the bank every
year <g>, on the task between when it starts and when it ends.

Assume for discussion the Project Calendar is the standard default calendar
showing a work schedule of 8-12 and 1-5.

If a task starts at 10am Mon and ends at 10am Tues, the duration is 8 hours
and the elapsed time is 24 hours. If one resource works on it by himself the
work is 8 man-hours. If 2 resources work together on it the work is 16
man-hours, if 3 the work is 24 hours, etc.

If a task starts on Mon 8am and ends Fri 5pm and requires a resource to put
out the equivalent effort of working for 1 hour on Mon morning, 1 hour on
Tue, 1 Hour on Wed, 1 hour on Thur, and then 4 hours Fri afternoon to finish
up, the duration is 40 hours, the elapsed time is 105 hours, the work is 8
man-hours, and the resource is working at a 20% assignment level.

So what you're asking to see in your question is the plain unadorned
existing duration field which shows the (working time) calendar time between
when work is first done on a task and when it finishes.
 
G

Guest

Hi Gerard,

Thanks for the reply.
I have tried to fool around with Datediff but with weird
results.
What are the valid time intervals?
If I use your example, why do I need to multiply with the
number of minutes? If I do I actually get a number that
is 3 times the number I am looking for.
The calculation does not work on summary tasks either.
Is this the only way to do it?
-----Original Message-----
Hello Carsten,
Insert a Duration field such as Duration1 and enter the formula :
(DateDiff("d";[Start];[Finish])*[Minutes Per Day])+ [Minutes Per Day]

Hope this helps,

Gérard Ducouret [Project MVP]
PragmaSoft ® - Paris

"Carsten" <[email protected]> a écrit dans le message de
Duration in MS Project means actual work for a task.
Is it possible to calculate and show in a field the
calendar time between Start and Finish?


.
 
S

Steve House

You need to convert from days to minutes because the core data storage
tables store durations as minutes. Hence DateDiff with "d" as the interval
gives you the number of days between two dates and you need to multiply them
by the MinutesPerDay (carries the number of working time minutes in a "day")
variable to get the duration.

You can also use the ProjDateDiff() function and that returns the duration
directly without having to do any conversion to minutes.

Once again I have to ask, though. Why are you doing this? You are in error
in your statement in your original question message when you say that
Project's durations are actual work on a task. They are not. They are the
time interval between Start and Finish expressed in *calendar* time units,
precisely what you say in your question that you want to calculate, and the
exact textbook definition of "duration.". Carsten >> " Is it possible to
calculate and show in a field the calendar time between Start and Finish?"
Other than an academic exercise to understand the date functions, why are
you re-inventing a field that is already there in even the most basic views,
the plain vanilla duration field as shown in the Gantt chart task entry
table?

The phrase "calendar time" used such as in your question refers to the
calendar that governs when the task may be scheduled - initially the Project
Calendar, or, when a resource has been assigned or a task calendar defined,
the resource or task calendar respectively. If our Project Calendar is the
default 08:00-12:00 & 13:00-17:00 M-F workweek, one "day" of Duration is 8
clock hours, the amount of time during a 24 period that the calendar says
work could possibly be performed if we wished. An Elapsed Time (sometimes
called elapsed duration but that phrase can be easily confused with
duration) day is always 24 hours. Work is the amount of effort actually
expended by a resource over a period of duration. For an individual
resource over any arbitrary period of time, the inequality "Work <= Duration
<= Elapsed" will always be true.

So duration is measured against the calendar while elapsed time is measured
by clocks. Thus a task that starts Mon at 8am and ends Fri at 5pm has a
duration of 40 calendar hours or 5 calendar days. Its total elapsed time is
105 clock hours or 4.375 24-hour clock days. Its actual work depends on how
many resources are assigned and what their assignment percentage may be.
Which of these values is it that you're actually trying to calculate -
duration or elapsed time? In other words, for the task running from Mon at
8 to Fri at 5, expressed in hours what number do you want the answer to be,
40 or 105 or are you looking for something else altogether?

--
Steve House [MVP]
MS Project Trainer/Consultant
Visit http://www.mvps.org/project/faqs.htm for the FAQs




Hi Gerard,

Thanks for the reply.
I have tried to fool around with Datediff but with weird
results.
What are the valid time intervals?
If I use your example, why do I need to multiply with the
number of minutes? If I do I actually get a number that
is 3 times the number I am looking for.
The calculation does not work on summary tasks either.
Is this the only way to do it?
-----Original Message-----
Hello Carsten,
Insert a Duration field such as Duration1 and enter the formula :
(DateDiff("d";[Start];[Finish])*[Minutes Per Day])+ [Minutes Per Day]

Hope this helps,

Gérard Ducouret [Project MVP]
PragmaSoft ® - Paris

"Carsten" <[email protected]> a écrit dans le message de
Duration in MS Project means actual work for a task.
Is it possible to calculate and show in a field the
calendar time between Start and Finish?


.
 
J

JackD

Try using projdatediff. It takes into account the project calendar.
Because the typical working day in project is eight hours, datediff will
give you answers that are three times as large (and maybe more if the
activity spans a weekend or holiday.

To make it work on summary tasks, set the summary task to use the formula
(you find this option in the customize fields dialog box)

-Jack



Hi Gerard,

Thanks for the reply.
I have tried to fool around with Datediff but with weird
results.
What are the valid time intervals?
If I use your example, why do I need to multiply with the
number of minutes? If I do I actually get a number that
is 3 times the number I am looking for.
The calculation does not work on summary tasks either.
Is this the only way to do it?
-----Original Message-----
Hello Carsten,
Insert a Duration field such as Duration1 and enter the formula :
(DateDiff("d";[Start];[Finish])*[Minutes Per Day])+ [Minutes Per Day]

Hope this helps,

Gérard Ducouret [Project MVP]
PragmaSoft ® - Paris

"Carsten" <[email protected]> a écrit dans le message de
Duration in MS Project means actual work for a task.
Is it possible to calculate and show in a field the
calendar time between Start and Finish?


.
 
G

Guest

Hi Steve,

Thanks for the very detailed answer.
I'll try to explain why I actually need the elapsed time.

When we do plan projects we bring in consultants from
overseas to do the work. These consultants have a fixed
cost per month no matter what the actual calendar states.
If there is 20 or 22 working days in a month, the cost is
still the same.
When I plan the project, I need to see how many months
(in elapsed time) I need to have consultants on the
ground to do my costing. Does this make sense?

Regards,

Carsten
-----Original Message-----
You need to convert from days to minutes because the core data storage
tables store durations as minutes. Hence DateDiff with "d" as the interval
gives you the number of days between two dates and you need to multiply them
by the MinutesPerDay (carries the number of working time minutes in a "day")
variable to get the duration.

You can also use the ProjDateDiff() function and that returns the duration
directly without having to do any conversion to minutes.

Once again I have to ask, though. Why are you doing this? You are in error
in your statement in your original question message when you say that
Project's durations are actual work on a task. They are not. They are the
time interval between Start and Finish expressed in *calendar* time units,
precisely what you say in your question that you want to calculate, and the
exact textbook definition of "duration.". Carsten >> " Is it possible to
calculate and show in a field the calendar time between Start and Finish?"
Other than an academic exercise to understand the date functions, why are
you re-inventing a field that is already there in even the most basic views,
the plain vanilla duration field as shown in the Gantt chart task entry
table?

The phrase "calendar time" used such as in your question refers to the
calendar that governs when the task may be scheduled - initially the Project
Calendar, or, when a resource has been assigned or a task calendar defined,
the resource or task calendar respectively. If our Project Calendar is the
default 08:00-12:00 & 13:00-17:00 M-F workweek, one "day" of Duration is 8
clock hours, the amount of time during a 24 period that the calendar says
work could possibly be performed if we wished. An Elapsed Time (sometimes
called elapsed duration but that phrase can be easily confused with
duration) day is always 24 hours. Work is the amount of effort actually
expended by a resource over a period of duration. For an individual
resource over any arbitrary period of time, the inequality "Work <= Duration
<= Elapsed" will always be true.

So duration is measured against the calendar while elapsed time is measured
by clocks. Thus a task that starts Mon at 8am and ends Fri at 5pm has a
duration of 40 calendar hours or 5 calendar days. Its total elapsed time is
105 clock hours or 4.375 24-hour clock days. Its actual work depends on how
many resources are assigned and what their assignment percentage may be.
Which of these values is it that you're actually trying to calculate -
duration or elapsed time? In other words, for the task running from Mon at
8 to Fri at 5, expressed in hours what number do you want the answer to be,
40 or 105 or are you looking for something else altogether?

--
Steve House [MVP]
MS Project Trainer/Consultant
Visit http://www.mvps.org/project/faqs.htm for the FAQs




Hi Gerard,

Thanks for the reply.
I have tried to fool around with Datediff but with weird
results.
What are the valid time intervals?
If I use your example, why do I need to multiply with the
number of minutes? If I do I actually get a number that
is 3 times the number I am looking for.
The calculation does not work on summary tasks either.
Is this the only way to do it?
-----Original Message-----
Hello Carsten,
Insert a Duration field such as Duration1 and enter the formula :
(DateDiff("d";[Start];[Finish])*[Minutes Per Day])+ [Minutes Per Day]

Hope this helps,

Gérard Ducouret [Project MVP]
PragmaSoft ® - Paris

"Carsten" <[email protected]> a écrit dans le message de
Duration in MS Project means actual work for a task.
Is it possible to calculate and show in a field the
calendar time between Start and Finish?


.


.
 
S

Steve House

DateDiff will give you the elapsed time you need.

And you've run right up against one of the reasons I sound like a broken
record saying that Project should not be used to replace accounting systems
(not that you've indicated that's what you're doing) and recommending using
it in conjunction with tools like Excel. As good as it is, it's just not a
one-stop solution to all the work involved in managing the project. The cost
to the firm of hiring an outside consultant for the month is not equal to
the cost to the project budget of using that consultant on tasks in the
project. An even more dramatic example of the difference is an external
resource brought in who charges an hourly rate with a minimum - say, $50 per
hour with a 4 hour minimum. If I use him for a one hour task one day, the
project budget gets hit for $50 but we'll get billed for $200.
--
Steve House [MVP]
MS Project Trainer/Consultant
Visit http://www.mvps.org/project/faqs.htm for the FAQs


Hi Steve,

Thanks for the very detailed answer.
I'll try to explain why I actually need the elapsed time.

When we do plan projects we bring in consultants from
overseas to do the work. These consultants have a fixed
cost per month no matter what the actual calendar states.
If there is 20 or 22 working days in a month, the cost is
still the same.
When I plan the project, I need to see how many months
(in elapsed time) I need to have consultants on the
ground to do my costing. Does this make sense?

Regards,

Carsten
-----Original Message-----
You need to convert from days to minutes because the core data storage
tables store durations as minutes. Hence DateDiff with "d" as the interval
gives you the number of days between two dates and you need to multiply them
by the MinutesPerDay (carries the number of working time minutes in a "day")
variable to get the duration.

You can also use the ProjDateDiff() function and that returns the duration
directly without having to do any conversion to minutes.

Once again I have to ask, though. Why are you doing this? You are in error
in your statement in your original question message when you say that
Project's durations are actual work on a task. They are not. They are the
time interval between Start and Finish expressed in *calendar* time units,
precisely what you say in your question that you want to calculate, and the
exact textbook definition of "duration.". Carsten >> " Is it possible to
calculate and show in a field the calendar time between Start and Finish?"
Other than an academic exercise to understand the date functions, why are
you re-inventing a field that is already there in even the most basic views,
the plain vanilla duration field as shown in the Gantt chart task entry
table?

The phrase "calendar time" used such as in your question refers to the
calendar that governs when the task may be scheduled - initially the Project
Calendar, or, when a resource has been assigned or a task calendar defined,
the resource or task calendar respectively. If our Project Calendar is the
default 08:00-12:00 & 13:00-17:00 M-F workweek, one "day" of Duration is 8
clock hours, the amount of time during a 24 period that the calendar says
work could possibly be performed if we wished. An Elapsed Time (sometimes
called elapsed duration but that phrase can be easily confused with
duration) day is always 24 hours. Work is the amount of effort actually
expended by a resource over a period of duration. For an individual
resource over any arbitrary period of time, the inequality "Work <= Duration
<= Elapsed" will always be true.

So duration is measured against the calendar while elapsed time is measured
by clocks. Thus a task that starts Mon at 8am and ends Fri at 5pm has a
duration of 40 calendar hours or 5 calendar days. Its total elapsed time is
105 clock hours or 4.375 24-hour clock days. Its actual work depends on how
many resources are assigned and what their assignment percentage may be.
Which of these values is it that you're actually trying to calculate -
duration or elapsed time? In other words, for the task running from Mon at
8 to Fri at 5, expressed in hours what number do you want the answer to be,
40 or 105 or are you looking for something else altogether?

--
Steve House [MVP]
MS Project Trainer/Consultant
Visit http://www.mvps.org/project/faqs.htm for the FAQs




Hi Gerard,

Thanks for the reply.
I have tried to fool around with Datediff but with weird
results.
What are the valid time intervals?
If I use your example, why do I need to multiply with the
number of minutes? If I do I actually get a number that
is 3 times the number I am looking for.
The calculation does not work on summary tasks either.
Is this the only way to do it?
-----Original Message-----
Hello Carsten,
Insert a Duration field such as Duration1 and enter the formula :
(DateDiff("d";[Start];[Finish])*[Minutes Per Day])+ [Minutes Per Day]

Hope this helps,

Gérard Ducouret [Project MVP]
PragmaSoft ® - Paris

"Carsten" <[email protected]> a écrit dans le message de
Duration in MS Project means actual work for a task.
Is it possible to calculate and show in a field the
calendar time between Start and Finish?


.


.
 

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