powered by
Parse date columns in a data.frame as Date. Use a named list to specify each date column (key) and the format (value) it is coded in.
parse_date_columns(data, date_formats)
data.frame with date columns in Date type
data.frame to modify
named list with:
Keys: Names of date columns
values: character specifying the format
J. Peter Marquardt
data <- data.frame(date = rep('01/23/4567', 5)) data <- parse_date_columns(data, list(date = '%m/%d/%Y'))
Run the code above in your browser using DataLab