The data is improperly formatted. The data entered for fiscal year end and actual filing data is not recognized as a date. Because of this the functions that calculate the amount of days in between 2 dates do not work. There are about 2000 observations for each of the 16 years, thus I think it's a little unreasonable for me to go through and manually calculate this for each observation. I'm not really sure what I should do.


Welcome to the real world, this is how it is most of the time. If you are talking about dates such 20011231, you have to parse it and turn it into a date! There would be lots of ways to do this, in Excel you could use:
CRSP dates: 19800522 (Say this is E62)
text formula: 05/22/80 (F62)
datenum: 05/22/80 (G62)
E62: 19800522
F62: =MID(TEXT(E62,0), 5, 2)&"/"&RIGHT(TEXT(E62,0),2)&"/"&RIGHT(LEFT(TEXT(E62,0),4),2)
G62: =VALUE(F62)
You could just make a single formula:
=value(MID(TEXT(E62,0), 5, 2)&"/"&RIGHT(TEXT(E62,0),2)&"/"&RIGHT(LEFT(TEXT(E62,0),4),2))

You might start maintaining a spreadsheet of these sort of utilities since they will continue to arise. This is true whether you go into business or academia.


Previous Back to STAT 486/686 Assignments FAQ Next