Change Date Format from %y-%m-%d %h:%m:%s to %Y%M%D with lubridate and mutate
问题 I've got a tbl_df with two columns StartTime and StopTime . Both are dttm . I want to change its format from "%y-%m-%d %h:%m:%s" to "%y%m%d" . I've tried data <- mutate(data, StartTime = ymd(StartTime), StopTime = ymd(StopTime)) But it returns Warning messages: 1: All formats failed to parse. No formats found. 2: All formats failed to parse. No formats found. How can I do it? Please, don't send other questions that don't use lubridate package. Thanks 回答1: I think this should work library