[R] Milliseconds and Time object
jim holtman
jholtman at gmail.com
Tue Oct 19 12:12:03 CEST 2010
Is this what you are after:
> date <- '2010-10-19'
> as.POSIXct(date)
[1] "2010-10-19 EDT"
> milli <- 3600000 # one hour in milliseconds
> as.POSIXct(date) + milli / 1000
[1] "2010-10-19 01:00:00 EDT"
>
On Tue, Oct 19, 2010 at 3:24 AM, statquant2 <statquant at gmail.com> wrote:
>
> Hello all,
> my question for today is the following :
>
> I have
> 1. a date (in a string but straightforward to convert to any format)
> 2. the time as the number of milliseconds elapsed since hour 00:00:00.000 of
> this date.
>
> My question is :
> 1. Is there a in built function that can give me the date+time (as POSIX
> object for instance) from what I have ?
> --
> View this message in context: http://r.789695.n4.nabble.com/Milliseconds-and-Time-object-tp3001570p3001570.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