Help needed with duration - work days conversion to calendar days
Author Message
Help needed with duration - work days conversion to calendar days

I'm running 98 and the schedule is reading duration in work days.  I
need to change this to calendar days and have the start and stop day
remain unchanged and the duration updated for calendar days.  Does
anyone know how to do this?

Thanks.

Wed, 03 Aug 2005 03:32:01 GMT
Help needed with duration - work days conversion to calendar days
If you schedule using edays (elapsed days) then duration will be calculated
based on the number of calendar days. Simply changing the duration to edays
will probably disrupt your start and finish dates however. To really do this
accurately you would probably have to write some Visual Basic code which
would do the correct sort of date math and then would change the task
duration.

All of this is also likely to{*filter*}up any work which has been entered for

If you just need a column to show the duration in calendar days (a read only
column) then I'd suggest that you write a small macro which would calculate
the duration and put the data into one of the text fields.
Something like:

Sub CalendarDuration()
Dim d As Long
'check for blank lines
If Not t Is Nothing Then
'subtract start from finish using minutes as units
d = DateDiff("n", t.Start, t.Finish)
'if the modulus of the difference is not a full day
If (d + 1) Mod 1440 <> 0 Then
d = d + 1440
End If
'set text10 for the task to the difference rounded down to the nearest
whole number
t.Text10 = d \ 1440 & " Days"
End If
Next t
End Sub

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.
For Macros and other things check http://www.*-*-*.com/

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> I'm running 98 and the schedule is reading duration in work days.  I
> need to change this to calendar days and have the start and stop day
> remain unchanged and the duration updated for calendar days.  Does
> anyone know how to do this?

> Thanks.

Wed, 03 Aug 2005 04:33:42 GMT
Help needed with duration - work days conversion to calendar days

(At least that's what we call our AZ birds :-)
Try this macro. I think it will do exactly what you want.

Sub conv_wd_to_ed()
If Not t Is Nothing And t.Summary = False Then
newdur = VBA.DateDiff("d", t.Start, t.Finish)
t.Duration = CStr(newdur) & "ed"
End If
Next t
End Sub

John

Wed, 03 Aug 2005 15:17:11 GMT

 Page 1 of 1 [ 3 post ]

Relevant Pages