I have CSV file with \"date\" column but it contains two different date format as the following
7/12/2015 15:28 as m/d/yyyy hh:mm 18-04-2016 18:20 as d/m/yy
Here is another option with lubridate
lubridate
library(lubridate) parse_date_time(x, c("mdy HM", "dmy HM")) #[1] "2015-12-07 15:28:00 UTC" "2016-04-18 18:20:00 UTC"
x <- c("7/12/2015 15:28","18-04-2016 18:20")