0

I have a data set on two variable as given below

Created-At            Text
02-10-2019 11:49       afllhsf
11/20/14 12:42 PM      dgkdlhgpe
02-06-2017 16:18       djgjheoe
12/15/17 10:53 AM      guofgowgoo

This data is very confusing for me as its date and time are not in one format somewhere time is considered as in 24 hour clock and somewhere in 12 hour clock. Also it has date in different format.

I have tried as.date() function but its not extracting only date

The output should look like this

Created-At            Text
02-10-2019 11:49       afllhsf
11-20-2014 12:42       dgkdlhgpe
02-06-2017 16:18       djgjheoe
12-15-2017 10:53       guofgowgoo

Thank you for your help.

djMohit
  • 151
  • 1
  • 10
  • 2
    You could use `parse_date_time` from `lubridate` and specify the formats that it can take manually https://stackoverflow.com/questions/25463523/convert-variable-with-mixed-date-formats-to-one-format Or use `anytime::anytime`. – Ronak Shah Jun 28 '19 at 06:35
  • 2
    See also https://stackoverflow.com/questions/44109014/how-to-get-r-date-time-format-from-mixed-date-time-informats – Joris C. Jun 28 '19 at 06:50

0 Answers0