-----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?
.
.