FRANCH有日期格式,如何转换为正常格式?
FRANCH有日期格式,如何转换为正常格式?我想要类似于 2022-2-7 2022 12:36:10 UTC
的格式
lubridate::dmy_hms("7 févr. 2022 12:35:10 UTC")
There is date format from FRANCH, how to pase to normal format? I want the format like 2022-2-7 2022 12:36:10 UTC
lubridate::dmy_hms("7 févr. 2022 12:35:10 UTC")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有两种选择(据我所知)。如果您安装了法语区域设置,则可以将其设置为
lubridate
函数中的一个选项:但是,您的法语区域设置可能会以不同的方式命名(请参阅 这个),除非您以法语安装操作系统,否则您不太可能有首先安装了语言环境。
第二个选项是将月份翻译为您当前的区域设置。对我来说这是英语,所以我可以快速实现这个功能:
由 reprex 创建于 2022-03-25包 (v2.0.1)
There are two options (that I know of). If you have a French locale installed, you can set it as an option in your
lubridate
functions:However, your French locale could be named differently (see this) and unless you installed your operating system in French, it is unlikely you have the locale installed in the first place.
The second option is to translate the month into your current locale. For me this is English, so I can whip up this quick function:
Created on 2022-03-25 by the reprex package (v2.0.1)