[R] Date-time Conversion from Numeric Representations
Uwe Ligges
ligges at statistik.tu-dortmund.de
Fri Dec 3 17:52:53 CET 2010
On 03.12.2010 16:31, Alexander Salim wrote:
> Hi all,
>
> I have a dataset called ,dataSet1'. The time column is given in a numeric
> code beginning with the year and ending with the minutes. Frist I tried the
> strptime() function to solve the problem. It gave me just the date back (and
> not the date and time). There is also the ISOdatetime function which didn't
> work either. I created a dump file which I detached to this mail with the
> objects ,dataSet1' and ,problem'.
strptime(x, "%Y%m%d%H%M")
should do the trick (without seeing the data).
But if you copy just one entry to your message, I could have been sure
(the attachtment did not make it and is not required if you just insert
a short example into your message)...
Uwe Ligges
> Thank you very much for your help.
>
> Alex
>
>
>
>
> ______________________________________________
> 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