I have a Dataset with a column date having following values
> class(daten$TIME)
#[1] "character"
head(daten$TIME)
#[1] "1999M01" "1999M02" "1999M03" "1999M04" "1999M05" "1999M06"
I would like to convert it to Date Format. I tried following code from the package zoom but its showing just NAs
as.yearmon(sub("^M ", "", daten$TIME), "%Y %m")
My sessionInfo() is showing following (maybe it helps):
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252