Hi Petr I researched a lot over the net and R manual as well based on which I revamped my code and came to the code as: test$CR_DT <- as.Date(test$CR_DT, '%d-%b-%y')
iii<- aggregate(test$CHG_WT,list(format(test$CR_DT,"%m")),FUN=sum) However it still gives me the error as below: Error in Summary.factor(c(1L, 1L, 1L, 3286L, 1646L, 3241L, 1L, 1L, 1307L, : ‘sum’ not meaningful for factors. If could you guide on how to achieve the desired output. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Summarizing-data-based-on-Date-tp4708328p4708384.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.