且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将日期转换为R中的可读格式

更新时间:2023-11-29 12:41:52

使用 as.POSIXct 代替:

time = as.POSIXct("Tue Jan 01 19:28:39 EST 2013", format="%a %b %d %H:%M:%S EST %Y")

从技术上讲,相同的 format 掩码也应与 strftime 一起使用,但不适用于我的系统.YMMV.

The same format mask should technically work with strftime as well, but did not work on my system. YMMV.