Skip to content

Change lag from hours to days

Emma LangMember for 10 years 2 months
Created
2
2
0

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

2 replies

Oldest first
  1. 0
    Tom Boyle ·

    Hi Emma,If you are

    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

  2. 0
    Rafael Davila ·

    Be reminded that Lag Calendar

    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.

Log in or join to reply

ProjectControls.com is free to join. Members can post questions, reply, vote and follow discussions.

Existing members: your original username and password still work. Forgot password?