This question already has an answer here:
This returns NA
instead of a Date object 2012-01
.
as.Date(
x = "2012-01",
format = "%Y-%m"
)
Why does this return NA
and what must I change to make it return a Date object representing January 2012?
zoo::as.yearmon('2012-01')
– RYO ENG Lian Hu Oct 12 '18 at 6:47