[R] Format dates issues with R

Micha Silver t@v|b@r @end|ng |rom gm@||@com
Tue Dec 14 12:05:00 CET 2021


On 14/12/2021 12:54, Luigi Marongiu wrote:
> Hello,
> I have these kind of dates:
> ```
>> ori[[n[3]]]
> they look to me as month, date, year so I formatted them as:
> ```

Looks like that to me also.


>> as.Date(ori[[n[3]]], format = "%D")
> # or:  as.Date(ori[[n[3]]], format = "%d/%m/%y")


But you format as day, month, yr, not what you suggested.

Try: format = "%m/%d/%Y"


-- 

Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918



More information about the R-help mailing list