Being motivated by real life applications in construction management, we consider the dynamic p-median problem and its extension with mobile facilities. The number of facilities changes over a planning horizon where one or more facilities can be opened, relocated, or closed in any period. The problem is to determine (i) facility locations, (ii) opening/closing times of facilities, (iii) routes of mobile facilities, and (iv) demand allocations to open facilities such that the total cost is minimized. We present a mixed integer programming formulation of the dynamic p-median problem using discretization of distances to control the locational decision variables. We develop a branch and price algorithm and constructive heuristics to solve the problem. Extensive computational results of the solution method are provided on a set of test problem instances.