[R] Date code conversion
Mark Knecht
markknecht at gmail.com
Sat Jul 4 21:24:58 CEST 2009
On Sat, Jul 4, 2009 at 12:10 PM, Allan Engelhardt<allane at cybaea.com> wrote:
> Try help("strptime"). Example
>
> strptime(1080103L + 19e6L, "%Y%m%d")
> # [1] "2008-01-03"
>
> (This assumes your input is an integer but you can just drop the L if you
> want)
>
>
> On 04/07/09 19:37, Mark Knecht wrote:
>
> Hi,
> Is there a function that will convert this sort of date code which
> looks like "years from 1900 + month_number + day_number" with no
> spaces? As an example Jan. 3rd 2008 would be written as 1080103.
>
> Thanks,
> Mark
Thanks. I'm building the program now that dumps all the data to csv
and wanted to make sure that I could handle this in R instead of the
app that's generating the data as it seems to be very slow at stuff
like these conversions. Looks to me like it should work so I keep
moving forward and maybe have some data in R in the next hour or two
to test.
Cheers,
Mark
More information about the R-help
mailing list