문제

I am looking for a way to convert a simple POSIX time stamp like this

> time
[1] "2014-02-19 17:40:41"

into an UNIX time stamp. All solutions I found only worked the other way round. Can anybody provide some help? Thanks in advance!

도움이 되었습니까?

해결책

Have you tried this?

as.numeric(as.POSIXct("2014-02-20"))

From ?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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top