How do i calculate the difference between start and end dates?

D

Dennis Meyer

I need to know how long it takes to deliver a task... not how many working
hours are involved (duration as calcualted by MS Project), but what is the
absolute difference between the start date/time and end date/time? I can
manually count the number of days and hours between the start date and end
date, but...

For example, I start a task on Tues 7/5/05 8:00AM and finish it on Sun
7/17/05 7:39 PM. The time it took to deliver the task was 12 days and almost
12 hours. Project calculates duration as 15.71 days, because some resources
work different shifts (8hrs, 12hrs, 10hrs). The duration as calculated is
useful, but not exactly what I need.

Anyone out there able to help?

Thanks.
 
J

Joe

I am not sure I fully understand why duration as calculated by MS project is
not what you are looking for. But based on your example, have you thought of
taking the difference of the Actual Start Date and Actual Finish Date fields?
You could probably set up a custom field to calculate this automatically.
But I think this calculation may end up giving you the same result as the
duration field would. It’s worth a try and compare the two.
 
J

John

Dennis Meyer said:
I need to know how long it takes to deliver a task... not how many working
hours are involved (duration as calcualted by MS Project), but what is the
absolute difference between the start date/time and end date/time? I can
manually count the number of days and hours between the start date and end
date, but...

For example, I start a task on Tues 7/5/05 8:00AM and finish it on Sun
7/17/05 7:39 PM. The time it took to deliver the task was 12 days and almost
12 hours. Project calculates duration as 15.71 days, because some resources
work different shifts (8hrs, 12hrs, 10hrs). The duration as calculated is
useful, but not exactly what I need.

Anyone out there able to help?

Thanks.

Dennis,
When a Project file is first set up, Duration can be entered as "ed"
(elapsed days). However I assume your file already exists. Perhaps the
simplest thing to do is to create a custom field with a formula. Use one
of the spare text fields (e.g. Text1) with the following formula:
Text1=DateDiff("d",[Start],[Finish])+1

Although it may be tempting to use a spare duration field, a special
compensating (fudge) factor would be required because duration fields
already convert values to days. . . but the conversion is based on
working days. It's just easier to use a spare text field.

Hope this helps.
John
Project MVP
 
D

Dennis Meyer

Joe, you're right- it gave me the same duration. Thanks all the same for the
response.

John, your solution did work- thank you very much. As text field, it worked
perfectly.

Dennis


John said:
Dennis Meyer said:
I need to know how long it takes to deliver a task... not how many working
hours are involved (duration as calcualted by MS Project), but what is the
absolute difference between the start date/time and end date/time? I can
manually count the number of days and hours between the start date and end
date, but...

For example, I start a task on Tues 7/5/05 8:00AM and finish it on Sun
7/17/05 7:39 PM. The time it took to deliver the task was 12 days and almost
12 hours. Project calculates duration as 15.71 days, because some resources
work different shifts (8hrs, 12hrs, 10hrs). The duration as calculated is
useful, but not exactly what I need.

Anyone out there able to help?

Thanks.

Dennis,
When a Project file is first set up, Duration can be entered as "ed"
(elapsed days). However I assume your file already exists. Perhaps the
simplest thing to do is to create a custom field with a formula. Use one
of the spare text fields (e.g. Text1) with the following formula:
Text1=DateDiff("d",[Start],[Finish])+1

Although it may be tempting to use a spare duration field, a special
compensating (fudge) factor would be required because duration fields
already convert values to days. . . but the conversion is based on
working days. It's just easier to use a spare text field.

Hope this helps.
John
Project MVP
 
J

John

Dennis Meyer said:
Joe, you're right- it gave me the same duration. Thanks all the same for the
response.

John, your solution did work- thank you very much. As text field, it worked
perfectly.

Dennis


Dennis,
You're welcome.
John
 
D

D Pingger

John,

Do I just copy and paste your formula in a text 1 field?

Thanks

Pingger

John said:
Dennis Meyer said:
I need to know how long it takes to deliver a task... not how many working
hours are involved (duration as calcualted by MS Project), but what is the
absolute difference between the start date/time and end date/time? I can
manually count the number of days and hours between the start date and end
date, but...

For example, I start a task on Tues 7/5/05 8:00AM and finish it on Sun
7/17/05 7:39 PM. The time it took to deliver the task was 12 days and almost
12 hours. Project calculates duration as 15.71 days, because some resources
work different shifts (8hrs, 12hrs, 10hrs). The duration as calculated is
useful, but not exactly what I need.

Anyone out there able to help?

Thanks.

Dennis,
When a Project file is first set up, Duration can be entered as "ed"
(elapsed days). However I assume your file already exists. Perhaps the
simplest thing to do is to create a custom field with a formula. Use one
of the spare text fields (e.g. Text1) with the following formula:
Text1=DateDiff("d",[Start],[Finish])+1

Although it may be tempting to use a spare duration field, a special
compensating (fudge) factor would be required because duration fields
already convert values to days. . . but the conversion is based on
working days. It's just easier to use a spare text field.

Hope this helps.
John
Project MVP
 
J

JulieS

Hi D Pingger,

First insert the spare text field in a table. (Insert > Column)
Right click on the column heading and choose Customize Field from the
shortcut menu.
Under the "Custom Attributes" section, click the Formula button.
Paste in DateDiff("d",[Start],[Finish])+1 in the formula window.
Click OK to close the formula window.
Click OK if you get the prompt about values in the field being replaced.
Click OK to close the Customize Fields dialog box.

Hope this helps. Let us know how you get along.

Julie

D Pingger said:
John,

Do I just copy and paste your formula in a text 1 field?

Thanks

Pingger

John said:
Dennis,
When a Project file is first set up, Duration can be entered as "ed"
(elapsed days). However I assume your file already exists. Perhaps the
simplest thing to do is to create a custom field with a formula. Use one
of the spare text fields (e.g. Text1) with the following formula:
Text1=DateDiff("d",[Start],[Finish])+1

Although it may be tempting to use a spare duration field, a special
compensating (fudge) factor would be required because duration fields
already convert values to days. . . but the conversion is based on
working days. It's just easier to use a spare text field.

Hope this helps.
John
Project MVP
 
D

D Pingger

Thanks, Julie. It works on my existing schedule but not on the one that I
just made. I'm going to have to diagnose why.

Pingger


JulieS said:
Hi D Pingger,

First insert the spare text field in a table. (Insert > Column)
Right click on the column heading and choose Customize Field from the
shortcut menu.
Under the "Custom Attributes" section, click the Formula button.
Paste in DateDiff("d",[Start],[Finish])+1 in the formula window.
Click OK to close the formula window.
Click OK if you get the prompt about values in the field being replaced.
Click OK to close the Customize Fields dialog box.

Hope this helps. Let us know how you get along.

Julie

D Pingger said:
John,

Do I just copy and paste your formula in a text 1 field?

Thanks

Pingger

John said:
Dennis,
When a Project file is first set up, Duration can be entered as "ed"
(elapsed days). However I assume your file already exists. Perhaps the
simplest thing to do is to create a custom field with a formula. Use one
of the spare text fields (e.g. Text1) with the following formula:
Text1=DateDiff("d",[Start],[Finish])+1

Although it may be tempting to use a spare duration field, a special
compensating (fudge) factor would be required because duration fields
already convert values to days. . . but the conversion is based on
working days. It's just easier to use a spare text field.

Hope this helps.
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