我在数据框“Job_applications”中有一个名为“rejected_at”的表。格式为:“M / DD / YYYY H:M:S PM / AM”。现在我想创建一个只有“M / DD”的新表。我怎么会这样做?enter image description here
你可以用lubridate来做
library(lubridate)
new_date <- mdy_hms("08/14/2017 09:59:06 PM")
new1 <- paste0(month(new_date),"/",day(new_date))