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!
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.