Date
42826
42827
42821
以下代码有效
chrstn_use$date <- as.Date(chrstn_use$date, origin = "1899-12-30")
结果:
2017-04-01
2017-04-02
2017-04-04
但在以下级别失败
chrstn_use$date <- ifelse(nchar(chrstn_use$date) == 5,
as.Date(chrstn_use$date, origin = "1899-12-30"),
chrstn_use$date)
结果:
17257
17258
17260
我想要yyyy-mm-dd
风格