How to convert an ambiguous datetime column in data.table without using strptime?
问题 My data.table has a column with an "ambiguous" datetime format: "12/1/2016 15:30". How can I convert this datetime to a format R recognizes in a data.table without using strptime() and getting the warning message for initially converting to POSIXlt. The process works but the warning makes me think there is another way. My data table: my_dates <- c("12/1/2016 15:30", "12/1/2016 15:31", "12/1/2016 15:32") this <- c("a", "b", "c") that <- c(1, 2, 3) my_table <- data.table(my_dates, this, that)