[R] convert numbers into dates and time

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed May 2 18:45:01 CEST 2012



On 02.05.2012 11:19, mpostje wrote:
> Hi
>
> I've been trying to convert numbers from an online temperature database
> into dates and time that R recognizes. the problem is that the database has
> put a T
> between the numbers and R will not accept any conversions.
>
> this is the format that it's in now
> 1981-01-02T08:00

strptime("1981-01-02T08:00", format="%Y-%m-%dT%H:%M")

seems to work for me.

Uwe Ligges


>
> can anyone help?
> cheers!
>
> --
> View this message in context: http://r.789695.n4.nabble.com/convert-numbers-into-dates-and-time-tp4602708.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.



More information about the R-help mailing list