📅  最后修改于: 2022-03-11 14:55:37.527000             🧑  作者: Mango
temp<-as.Date(c("2014-06-01","1993-06-01", "2013-06-03", "1999-01-31"), "%Y-%m-%d")
x<-format(temp, format="%m-%d")
x
[1] "06-01" "06-01" "06-03" "01-31"
sort(x)
[1] "01-31" "06-01" "06-01" "06-03"