I would like to convert a date week.year ("44.2016") to year.month (2016-11) in ISO 8601
I have a variable date_week <- "44.2016"
I tried this :
as.Date(date_week, format = "%U.%Y")
as.Date(date_week, format = "%W.%Y")
Run Code Online (Sandbox Code Playgroud)
I have this result: "2016-02-21"
I also tried this :
as.Date(date_week, format = "%w.%Y")
as.Date(date_week, format = "%w.%Y")
Run Code Online (Sandbox Code Playgroud)
result : NA
I would like to have this RESULT : "2016-11"
Thanks for your help !