[R-SIG-Finance] time format convert

Chirag Anand anand.chirag at gmail.com
Mon Sep 29 07:30:21 CEST 2014


On 29 September 2014 09:18, jun wang <junluke at gmail.com> wrote:
> Dear all,
>
> I have the following data format:
>
>                                           x
> 2012-02-24 10:10:00 1.267113e-05
> 2012-02-27 10:10:00 2.397383e-05
> 2012-02-28 10:10:00 2.576296e-05
> 2012-02-29 10:10:00 4.171427e-05
> 2012-03-01 10:10:00 3.855354e-05
> 2012-03-02 10:10:00 2.446517e-05
> 2012-03-05 10:10:00 2.565693e-05
> 2012-03-06 10:10:00 2.137300e-05
> 2012-03-07 10:10:00 1.953491e-05
> 2012-03-08 10:10:00 1.425474e-05
>
> I was wondering if there is any way to convert this into the following
> format,basically get rid of the time,just keep the data.

Convert timestamps to a time based object if they are not already and
use format() to only pull out the dates.

-- 
Chirag Anand
http://atvariance.in/chiraganand



More information about the R-SIG-Finance mailing list