how to restructure a dataset for discrete time survival analysis?

#1
I would like to develop a discrete time logit model to predict corporate bankruptcy. My sample period is between 2007 and 2013. I don't know how to code 'time to events' as 1) many firms (let's say company ID 1 in the attached file ) had already existed and were exposed to bankruptcy risk before the sample period (I think that this is referred to as left truncation), 2) companies like company ID 2 were not only left truncated but had a delay in entering the sample from 2008, 3) company ID 3 did not enter the sample until 2010 when it was established. so how to code time to events when you preparing your dataset for discrete time survival analysis.
Thanks very much.
Tim
 

Attachments