[R] change date format
arun
smartpink111 at yahoo.com
Thu Mar 13 15:42:06 CET 2014
Try:
vec1 <- c("4/15/11 11:49 AM", "6/12/12 2:30 PM", "5.6.11 2:51 PM")
vec2 <- gsub("[.]","/",vec1)
A.K.
On Thursday, March 13, 2014 9:57 AM, catalin roibu <catalinroibu at gmail.com> wrote:
Dear all!
I have a new problem with the date format in a data frame. I have rainfall
records extracted from an automatic meteo station. In the same data frame
(with 10000 records) the date is in 2 formats like that:
4/15/11 11:49 AM
5.6.11 2:51 PM
My question is how to modify date format for all records with this format
type: 4/15/11 11:49 AM.
Thank you!
Best regards!
Catalin
--
---
Catalin-Constantin ROIBU
Lecturer PhD, Forestry engineer
Forestry Faculty of Suceava
Str. Universitatii no. 13, Suceava, 720229, Romania
office phone +4 0230 52 29 78, ext. 531
mobile phone +4 0745 53 18 01
+4 0766 71 76 58
FAX: +4 0230 52 16 64
silvic.usv.ro
[[alternative HTML version deleted]]
______________________________________________
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.
More information about the R-help
mailing list