Tena koe

For example:

myTime <- Sys.time()
myTime
[1] "2014-11-04 14:58:10 NZDT"
format(myTime, '%Y%m%d:%H%M%S')
[1] "20141104:145810"

My information in ?strptime.

HTH ....

Peter Alspach

-----Original Message-----
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of TJUN KIAT TEO
Sent: Tuesday, 4 November 2014 11:10 a.m.
To: r-help@r-project.org
Subject: [R] Convert time format to character

Suppose I have a object in time format

2014-08-13 00:30:00

I want to convert it to a character string 20140813003000

Is is possible ?

Tjun Kiat
                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@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.
The contents of this e-mail are confidential and may be ...{{dropped:14}}

______________________________________________
R-help@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.

Reply via email to