Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Group,
myurl = "http://finance.google.com/finance/historical?histperiod=daily&q=" _ & sym & "&startdate=" & StartMo & "+" & StartDay & "%2C+" & StartYr & "&enddate=" _ & StopMo & "+" & StopDay & "%2C+" & StopYr & "&output=csv" With qt .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With The above query is not bringing in the dates that I expected. The dates should be between 1/12/2009 and 6/8/2009. The variables used above a StartMo = 1 StartDay = 12 StartYr = 2009 StopMo = 6 StopDay = 8 StopYr = 2009 It brings in 6/18/2009 back to 6/20/2008, about a year. Not sure how to change url to get this to happen. Thanks, David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try with a date format of YYYY/MM/DD
Mishell "David" wrote in message ... Hi Group, myurl = "http://finance.google.com/finance/historical?histperiod=daily&q=" _ & sym & "&startdate=" & StartMo & "+" & StartDay & "%2C+" & StartYr & "&enddate=" _ & StopMo & "+" & StopDay & "%2C+" & StopYr & "&output=csv" With qt .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With The above query is not bringing in the dates that I expected. The dates should be between 1/12/2009 and 6/8/2009. The variables used above a StartMo = 1 StartDay = 12 StartYr = 2009 StopMo = 6 StopDay = 8 StopYr = 2009 It brings in 6/18/2009 back to 6/20/2008, about a year. Not sure how to change url to get this to happen. Thanks, David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
The date is split into variables as indicated below. The query does pull in data, it is just the wrong dates, and a similar query works with numbers in a different file. Thanks for your suggestion. David "Mishell" wrote: Try with a date format of YYYY/MM/DD Mishell "David" wrote in message ... Hi Group, myurl = "http://finance.google.com/finance/historical?histperiod=daily&q=" _ & sym & "&startdate=" & StartMo & "+" & StartDay & "%2C+" & StartYr & "&enddate=" _ & StopMo & "+" & StopDay & "%2C+" & StopYr & "&output=csv" With qt .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With The above query is not bringing in the dates that I expected. The dates should be between 1/12/2009 and 6/8/2009. The variables used above a StartMo = 1 StartDay = 12 StartYr = 2009 StopMo = 6 StopDay = 8 StopYr = 2009 It brings in 6/18/2009 back to 6/20/2008, about a year. Not sure how to change url to get this to happen. Thanks, David |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HiMishell,
I do not know if you are interested, but I did find the answer. I had to format the month of each date "mmm", but I do have to break up the query still, since it is going in as a variable. Thanks again for your time and efforts. :), David "Mishell" wrote: Try with a date format of YYYY/MM/DD Mishell "David" wrote in message ... Hi Group, myurl = "http://finance.google.com/finance/historical?histperiod=daily&q=" _ & sym & "&startdate=" & StartMo & "+" & StartDay & "%2C+" & StartYr & "&enddate=" _ & StopMo & "+" & StopDay & "%2C+" & StopYr & "&output=csv" With qt .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With The above query is not bringing in the dates that I expected. The dates should be between 1/12/2009 and 6/8/2009. The variables used above a StartMo = 1 StartDay = 12 StartYr = 2009 StopMo = 6 StopDay = 8 StopYr = 2009 It brings in 6/18/2009 back to 6/20/2008, about a year. Not sure how to change url to get this to happen. Thanks, David |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am glad you found the answer.
Mishell "David" wrote in message ... HiMishell, I do not know if you are interested, but I did find the answer. I had to format the month of each date "mmm", but I do have to break up the query still, since it is going in as a variable. Thanks again for your time and efforts. :), David "Mishell" wrote: Try with a date format of YYYY/MM/DD Mishell "David" wrote in message ... Hi Group, myurl = "http://finance.google.com/finance/historical?histperiod=daily&q=" _ & sym & "&startdate=" & StartMo & "+" & StartDay & "%2C+" & StartYr & "&enddate=" _ & StopMo & "+" & StopDay & "%2C+" & StopYr & "&output=csv" With qt .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With The above query is not bringing in the dates that I expected. The dates should be between 1/12/2009 and 6/8/2009. The variables used above a StartMo = 1 StartDay = 12 StartYr = 2009 StopMo = 6 StopDay = 8 StopYr = 2009 It brings in 6/18/2009 back to 6/20/2008, about a year. Not sure how to change url to get this to happen. Thanks, David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Strange? VBA code returns wrong date format (not a date) | Excel Programming | |||
my keyboard brings up wrong characters | Excel Discussion (Misc queries) | |||
date entered wrong or not as a date | Excel Worksheet Functions | |||
Excel 03 DB query pulls data in wrong order, how to resolve? | Excel Discussion (Misc queries) | |||
Wrong date on my posts. | Excel Discussion (Misc queries) |