How to Change a dataframe column into datetime with Lubridate?

So I have imported some data and the Date column as showed up as a character string and is formatted like "01.01.2019" for all 71,000 rows. I have used dmy() but it separates the Dates from the whole Data Frame. I need these dates for a graph, so it needs to be within the data frame. Help!!

Simply add the new date vector to the data.frame

Let your data.frame be called mydata

mydata$newdate  <- dmy(mydata$Date)
1 Like

You are a blessing! Thank you!

If things are working okay would you mark this thread as solved? Thanks

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.