[R] 19900501 into 1990-05-01

jim holtman jholtman at gmail.com
Fri Nov 6 01:03:53 CET 2009


If you just want it to remain as character data:

> sub("(....)(..)(..)", "\\1 \\2 \\3", "19000501")
[1] "1900 05 01"
>


On Thu, Nov 5, 2009 at 2:04 PM, frenchcr <frenchcr at btinternet.com> wrote:
>
> I have a column of dates in this format.. 19900501
>
> I want to change
> 19900501 into 1990 05 01
> then append a new column on the end (right hand side of spreadsheet)
>
> :confused:
> --
> View this message in context: http://old.nabble.com/19900501-into-1990-05-01-tp26217515p26217515.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