[R] Standard Time Stamps

jim holtman jholtman at gmail.com
Wed Oct 28 17:15:43 CET 2009


How about this:

> x <- c("2008-09-12T23:48:07.747Z", "2008-09-12T20:35:07.747Z")
> x.t <- as.POSIXct(x, format="%Y-%m-%dT%H:%M:%OS")
>
> x.t
[1] "2008-09-12 23:48:07 EDT" "2008-09-12 20:35:07 EDT"
> diff(x.t)
Time difference of -3.216667 hours
>


On Wed, Oct 28, 2009 at 12:11 PM, Sunita22 <sunitap22 at gmail.com> wrote:
>
> Hello
>
> I have a data set which contains a column of Standard Time Stamps
> (2008-09-12T23:48:07.747Z, 2008-09-12T20:35:07.747Z, etc)
> I need to find differences in consecutive time stamps and then need to plot
> a graph using it, can anyone guide me as to how to handle this type of data?
>
> Thanks in advance
>
> Sunita
> --
> View this message in context: http://www.nabble.com/Standard-Time-Stamps-tp26097512p26097512.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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