I have a column stating month and year "Jan-14" as seen below
I would like to convert it to "1/1/2014". As of now it is a character type. When I use as.Date(), all the values change to NAs. I wanted to use lubridate() also, but I am doing something wrong that it doesn't work at all.
Any idea as to how we can convert the column to Date type and with formatting as 1/1/2014.
I had to add a prefix of 01 to the dates to convert them with lubridate.
I do not know how to format the date within the data frame and I cannot think of a reason to do it. If you want to format the character representation of the date, you can use the format function.