Change lag from hours to days

E
Emma Lang 👤 Member for 9 years 9 months

Is there a quick way to change the lag in predecessors and successors to show in days rather than hours? 

I've exported from P6 and the lag appears as hours instead of days. 

 

Thanks

R
Rafael Davila 👤 Member for 22 years 3 months

Be reminded that Lag Calendar must be considered:

  • 24 hours lag when lag calendar is 24h/day = 1 work day as defined by lag calendar.
  • 24 hours lag when lag calendar is 8h/day = 3 work days as defined by lag calendar.
  • The conversion factor for each lag is not always the same. 
  • Lag calendar is a link attribute not a global project attribute, you need to know specific link lag calendar in order to get right conversion.  More advanced software allows for lag calendar to be independent of any arbitrary rule across the board, in this case lag calendar is always easily accessible. 
  • Conversion from work hours to work days gets more complicated when work hours/day is different some days, not uncommon, like 8h/day 5 days a week and 4h/day on sixth day. 
  • For some versions of MS Project the link calendar is the calendar of the successor activity. If your P6 settings was not for lag to use the calendar of the successor you may have some problems.  
  • I use software that defines independent lag calendars; most of our schedules use independent calendars for activities, resources and lag.  Our most common scenario is for activities and resources to have an 8 hours/day 5 days a week calendar each calendar with their particular calendar exceptions, while for lag we also use 24 hours/day 7 days a week calendar.
T
Tom Boyle 👤 Member for 19 years 6 months

Hi Emma,

If you are comfortable with vba, then it's easy to do with this little snippet:

Sub ChangeLagTypeHtoD()

Dim t As Task

Dim dep As TaskDependency

For Each t In ActiveProject.Tasks

    If Not t Is Nothing Then

        For Each dep In t.TaskDependencies

            If dep.LagType = pjHours Then

                dep.Lag = dep.Lag / (60 * ActiveProject.HoursPerDay) & "days"

            End If

        Next dep

    End If

Next t

End Sub

Otherwise you may just as well change them manually - after running an autofilter for [contains "h"] in the Predecessors field.

Good luck, tom

Forum Sponsor

Top Posters

Julian Pegg
1 posts
Peter Nagy
2 posts
Raymund de Laza
17 posts
Syed_Asad
0 posts
Tony Greyvenstein
0 posts
Ahmed Al-Jubouri
13 posts
Umar Alvi
3 posts
Sibusiso Mahlalela
0 posts
Michael Samanyayi
3 posts
Simon Gumede
0 posts