Message-ID: <1351968015298-4648327.post@n4.nabble.com>
Date: 2012-11-03T18:40:15Z
From: veepsirtt
Subject: Date format conversion from "2012-09-20" to "2012:09:20"
In-Reply-To: <1351886540.72334.YahooMailNeo@web142606.mail.bf1.yahoo.com>
Hi,
thanks A.K
try this not working
#*****************************************************************
# Load historical data
#******************************************************************
library('quantmod')
endDate =Sys.Date()
startDate = as.Date(endDate-10, order="ymd")
dataspy = getSymbols("SPY", from = startDate, to=endDate, auto.assign =
FALSE)
myStDt<- startDate
while (myStDt <= endDate){
startEndDate<-paste(startDate,myStDt,sep="::")
print(dataspy)
dataspy=Cl(dataspy[startEndDate])
#display the subseted data
print(dataspy)
myStDt=myStDt+1
}
--
View this message in context: http://r.789695.n4.nabble.com/Date-format-conversion-from-2012-09-20-to-2012-09-20-tp4643710p4648327.html
Sent from the R help mailing list archive at Nabble.com.