我正在寻找一种方法来转换像这样的简单POSIX时间戳
> time
[1] "2014-02-19 17:40:41"
进入UNIX时间戳。我发现的所有解决方案都只是相反。任何人都可以提供一些帮助吗? 提前谢谢!
答案 0 :(得分:1)
你试过这个吗?
as.numeric(as.POSIXct("2014-02-20"))
来自?POSIXct
There are two basic classes of date/times. Class "POSIXct" represents the (signed)
number of seconds since the beginning of 1970 (in the UTC timezone) as a numeric vector.