I have data pulled from a database and stored in Stata .dta files. But when I read it into R using the foreign
package, I get a date format unlike any I've seen. All of the other dates are "%m/%d/%Y" and import correctly.
I have searched the database's documentation, but there's no explanation for the odd date format for "DealActiveDate". The "facilitystartdate" date should be close to the "DealActiveDate", but not necessarily the same. Here are a few rows of these two columns.
facilitystartdate DealActiveDate
1 09/12/1987 874022400000
2 09/12/1987 874022400000
3 09/12/1987 874022400000
4 09/01/1987 873072000000
5 09/08/1987 873676800000
6 10/01/1987 875664000000
7 08/01/1987 870393600000
8 08/01/1987 870393600000
9 10/01/1987 875664000000
10 09/01/1987 873072000000
Please let me know if you have any idea how to convert "DealActiveDate" to a more conventional date. Thanks! (I'm not sure SO is the best venue, but I couln't think of any other options!)
foreign
problem; it's likely just an odd date format. I got the data from a Stata user who thinks there's something wrong with the "DealActiveDate" column, but never chased down the problem (he just never uses it). I searched the online version of the database, but had no luck. I am hopeful that some wizard here would know the odd date or Stata format. – Plumb