Change lag from hours to days

Member for

21 years 8 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.

Member for

18 years 11 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