[R] read the date format
hi I have a data like thursday, November 20,2012. I'm not able to convert into data format in R Can anyone please help - Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/read-the-date-format-tp4635245.html Sent from the R help mailing list archive at Nabble.com. __ 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.
Re: [R] read the date format
Hello, Try, with 'x' your date(s), as.Date(x, format=%A, %B %d,%Y) strptime(x, format=%A, %B %d,%Y) Note: this is in the help page for ?strptime Hope this helps, Rui Barradas Em 03-07-2012 07:04, arunkumar escreveu: hi I have a data like thursday, November 20,2012. I'm not able to convert into data format in R Can anyone please help - Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/read-the-date-format-tp4635245.html Sent from the R help mailing list archive at Nabble.com. __ 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. __ 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.
Re: [R] read the date format
Hi, Hope this helps. date1- c(thursday November 20, 2012, friday November 21, 2012, saturday November 22, 2012) date2- as.Date(date1, format= %A %B %d, %Y) date2 [1] 2012-11-20 2012-11-21 2012-11-22 A.K. - Original Message - From: arunkumar akpbond...@gmail.com To: r-help@r-project.org Cc: Sent: Tuesday, July 3, 2012 2:04 AM Subject: [R] read the date format hi I have a data like thursday, November 20,2012. I'm not able to convert into data format in R Can anyone please help - Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/read-the-date-format-tp4635245.html Sent from the R help mailing list archive at Nabble.com. __ 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. __ 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.