On Sep 18, 2010, at 11:25 AM, Santosh Srinivas wrote:
Strangely this is not working ... what am I doing wrong here?
tDate <- FnO_Data$Date[1]
tDate
[1] 20090101
as.Date(c(tDate),format="%Y%m%d")
[1] NA
?sasDate
as.Date does not take numeric arguments. Try:
> as.Date(as.character(tDate), format="%Y%M%d")
[1] "2009-09-01"
--
David Winsemius, MD
West Hartford, CT
______________________________________________
R-help@r-project.org mailing list
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.