Answers for "how to drop the day off of a date in r"

0

how to drop the day off of a date in r

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"
Posted by: Guest on July-17-2020

Code answers related to "how to drop the day off of a date in r"

Browse Popular Code Answers by Language