##simulated excel. I used an excel to tes tthe code though.
a<-seq(from = as.Date(Sys.Date()), to = seq(as.Date(Sys.Date()),
length.out = 12, by= "-1 years")[2], by = "-1 days")
a<-as.numeric(a)
a<-a+25569
a<-as.Date(as.numeric(a[1:length(a)]), origin = as.Date("1970-01-01"))
##a is in One Year of dates like your excel list.
a<-as.numeric(a)
a<-a-25569
a<-as.Date(as.numeric(a[1:length(a)]), origin = as.Date("1970-01-01"))
a<-format(a, "%b-%y")
2 回答
在excel中,编号为40182的日期为04-01-2010,格式为日期 . 所以我认为你在寻找这个:
这使:
希望能帮助到你!!!
希望这能帮助你 .