Guild of Project Controls: Compendium | Roles | Assessment | Certifications | Membership

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

Change lag from hours to days

2 replies [Last post]
Emma Lang
User offline. Last seen 1 year 41 weeks ago. Offline
Joined: 9 Aug 2016
Posts: 45
Groups: None

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

Replies

Rafael Davila
User offline. Last seen 13 hours 24 min ago. Offline
Joined: 1 Mar 2004
Posts: 5229

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.
Tom Boyle
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 28 Nov 2006
Posts: 304
Groups: None

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