Estimating the Effect of Treatment Duration Using Observational Data in Practice