帮助解释/转换奇数日期格式
我从数据库中提取数据并将其存储在 Stata .dta 文件中。但是,当我使用 foreign
包将其读入 R 时,我得到的日期格式与我见过的任何格式都不一样。所有其他日期均为“%m/%d/%Y”并正确导入。
我搜索了数据库的文档,但没有解释“DealActiveDate”的奇怪日期格式。 “facilitystartdate”日期应接近“DealActiveDate”,但不一定相同。这是这两列的几行。
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
如果您知道如何将“DealActiveDate”转换为更常规的日期,请告诉我。谢谢! (我不确定 SO 是最好的场地,但我想不出任何其他选择!)
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!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来像是自 1960 年 1 月 1 日以来的毫秒数:
Looks like milliseconds since 1960-01-01: