[R-sig-Geo] How convert day of the year in year/month/day

Yang Li yangli at iastate.edu
Sun Dec 2 19:09:23 CET 2012


You could use

 > x <- 2005135
 > strptime(x, format="%Y %j")
[1] "2005-05-15"

Yang

On 12/2/2012 11:31 AM, Julio Oliveira wrote:
> Dears,
>
> I have dates of the type YYYYddd (ex.: 2005135), where 2005 is the year and 135 is day of the year.
>
> I need convert this format for year/month/day (%Y/%b%d).
>
> Thanks.
>
> Julio
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list