拥有“ yyyy.mm.dd”的最简单方法r格式?
因此,我意识到,这不是至少使用as.date()
来处理的常见日期类型。当我执行以下操作时,输出不正确。
> as.Date(Sys.Date(), format = "yyyy.mm.dd")
[1] "2022-06-21"
有橄榄酸还是基本r可以简单的方法?
So I realized that this isn't a common date type to deal with at least with using as.Date()
. When I do the following , the output isn't correct.
> as.Date(Sys.Date(), format = "yyyy.mm.dd")
[1] "2022-06-21"
Is there an easy way to this with lubridate or base R?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们可以使用
格式
而不是as.date
assys.date()
已经在date
类中,但是如所注释,格式
仅返回字符
classWe can use
format
instead ofas.Date
asSys.Date()
is already inDate
class, however as commented,format
returns only acharacter
class