Converting different dates formats into a single date format

Hello, I have a large data set with over thousands of entries and thousands of date. There are multiple columns. One of the column is called "date", and it has thousands of entries with the 2 different date type formats (i.e. %d%m%y1/10/2018 and %m%d%y10/2/2020). How can I change into a single date format?

#data.frame date column data with different data formats
1   1/8/2018
2  10/5/2019
3   2/5/2019
4  24/6/2013
5 11/22/2020
6 11/10/2020
7  11/2/2020
8  3/12/2021

using the parse_date_time function from lubridate package, some how I am able to convert the dates in to single format **Year-Month-Date**. But there is some issue while converting into a single format.

How I parsed the date column and passes the mdy/dmy available date formats in date column
parse_date_time(data_df$Date, orders = c('mdy', 'dmy'))

[1] "2018-01-08 UTC" "2019-10-05 UTC" "2019-02-05 UTC" "2013-06-24 UTC" "2020-11-22 UTC" "2020-11-10 UTC" "2020-11-02 UTC" "2021-03-12 UTC"

Note still, I am working on it. Current made the changes in temporary cloned data and cross checking the dates.

Consider your first example : 1/8/2018

is it the 1st of August, or the 8th of January ?

Thanks for your response, Its a 8th of January.

That's great, but how do you know?

Update has been added to asked question.

This topic was automatically closed 21 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.