[R] From time-strings to Unix-Epoche-time?
jim holtman
jholtman at gmail.com
Fri Sep 12 15:45:04 CEST 2008
If you are using POSIXct, just 'unclass' the value:
> x <- as.POSIXct('2008-09-12 09:00')
> str(x)
POSIXct[1:1], format: "2008-09-12 09:00:00"
> unclass(x)
[1] 1221210000
attr(,"tzone")
[1] ""
On Fri, Sep 12, 2008 at 9:15 AM, Oliver Bandel
<oliver at first.in-berlin.de> wrote:
> Hello,
>
>
> I have strings with date-/time-data from a logfile.
>
> For a sort-by-time (and other time-related analysis)
> I need something to convert the
> times to the Unix-epoche-time (better also with parts
> of seconds).
>
> Is there something that does that job (or a similar conversion)
> in R?
>
> TIA,
> Oliver Bandel
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?
More information about the R-help
mailing list